fix gui scale slider (#3466)
This commit is contained in:
parent
fee95df844
commit
6c5a653d1d
@ -6,8 +6,13 @@ namespace big
|
||||
void view::gui_settings()
|
||||
{
|
||||
components::sub_title("SETTINGS_UI_SCALE"_T);
|
||||
if (ImGui::SliderFloat("##gui-scale", &g.window.gui_scale, 0.75f, 1.5f, "%.2f"))
|
||||
static auto gui_scale = g.window.gui_scale;
|
||||
ImGui::SliderFloat("##gui-scale", &gui_scale, 0.75f, 1.5f, "%.2f");
|
||||
if (ImGui::IsItemDeactivatedAfterEdit())
|
||||
{
|
||||
g.window.gui_scale = gui_scale;
|
||||
g_renderer.rescale(g.window.gui_scale);
|
||||
}
|
||||
|
||||
components::sub_title("SETTINGS_UI_COLOR"_T);
|
||||
static ImVec4 col_gui = ImGui::ColorConvertU32ToFloat4(g.window.background_color);
|
||||
|
Reference in New Issue
Block a user