Add graphics settings tab
This commit is contained in:
parent
cdbeb838ab
commit
41d5d01958
3 changed files with 15 additions and 8 deletions
|
|
@ -1152,7 +1152,9 @@ void FileSelectScreen::settings_view() {
|
||||||
radio_button_selector(gui, "VSync selector", &main.conf.vsyncValue, {
|
radio_button_selector(gui, "VSync selector", &main.conf.vsyncValue, {
|
||||||
{"On", 1},
|
{"On", 1},
|
||||||
{"Off", 0},
|
{"Off", 0},
|
||||||
{"Adaptive", -1}
|
#ifndef __ANDROID__
|
||||||
|
{"Adaptive", -1}, // Usually doesn't work on android
|
||||||
|
#endif
|
||||||
}, [&] {
|
}, [&] {
|
||||||
main.set_vsync_value(main.conf.vsyncValue);
|
main.set_vsync_value(main.conf.vsyncValue);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1473,6 +1473,7 @@ void Toolbar::general_settings_inner_gui() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
category_button("Generalbutton", "General", GSETTINGS_GENERAL);
|
category_button("Generalbutton", "General", GSETTINGS_GENERAL);
|
||||||
|
category_button("Graphicsbutton", "Graphics", GSETTINGS_GRAPHICS);
|
||||||
category_button("Tabletbutton", "Tablet", GSETTINGS_TABLET);
|
category_button("Tabletbutton", "Tablet", GSETTINGS_TABLET);
|
||||||
category_button("Themebutton", "Theme", GSETTINGS_THEME);
|
category_button("Themebutton", "Theme", GSETTINGS_THEME);
|
||||||
category_button("Keybindsbutton", "Keybinds", GSETTINGS_KEYBINDS);
|
category_button("Keybindsbutton", "Keybinds", GSETTINGS_KEYBINDS);
|
||||||
|
|
@ -1522,10 +1523,15 @@ void Toolbar::general_settings_inner_gui() {
|
||||||
slider_scalar_field(gui, "scroll zoom slider", "Scroll zoom speed", &main.conf.scrollZoomSpeed, 0.0, 1.0, {.decimalPrecision = 3});
|
slider_scalar_field(gui, "scroll zoom slider", "Scroll zoom speed", &main.conf.scrollZoomSpeed, 0.0, 1.0, {.decimalPrecision = 3});
|
||||||
checkbox_boolean_field(gui, "flip zoom tool direction", "Flip zoom tool direction", &main.conf.flipZoomToolDirection);
|
checkbox_boolean_field(gui, "flip zoom tool direction", "Flip zoom tool direction", &main.conf.flipZoomToolDirection);
|
||||||
checkbox_boolean_field(gui, "make all tools share same size", "Make all tools share size", &main.toolConfig.globalConf.useGlobalRelativeWidth);
|
checkbox_boolean_field(gui, "make all tools share same size", "Make all tools share size", &main.toolConfig.globalConf.useGlobalRelativeWidth);
|
||||||
#ifndef __EMSCRIPTEN__
|
|
||||||
checkbox_boolean_field(gui, "disable graphics driver workarounds", "Disable graphics driver workarounds (enabling or disabling this might fix some graphical glitches, requires restart)", &main.conf.disableGraphicsDriverWorkarounds);
|
|
||||||
#endif
|
|
||||||
input_scalar_field(gui, "jump transition time", "Jump transition time", &main.conf.jumpTransitionTime, 0.01f, 1000.0f, {.decimalPrecision = 2});
|
input_scalar_field(gui, "jump transition time", "Jump transition time", &main.conf.jumpTransitionTime, 0.01f, 1000.0f, {.decimalPrecision = 2});
|
||||||
|
|
||||||
|
checkbox_boolean_field(gui, "real time eraser", "Eraser works in real time", &main.conf.realTimeEraser);
|
||||||
|
checkbox_boolean_field(gui, "force extension on path", "Force extension on path when saving files", &main.conf.forceExtensionOnPath);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GSETTINGS_GRAPHICS: {
|
||||||
|
general_scroll_area("graphics settings", [&] {
|
||||||
input_scalar_field(gui, "Max GUI Scale", "Max GUI Scale", &main.conf.guiScale, 0.5f, 5.0f, {
|
input_scalar_field(gui, "Max GUI Scale", "Max GUI Scale", &main.conf.guiScale, 0.5f, 5.0f, {
|
||||||
.decimalPrecision = 1,
|
.decimalPrecision = 1,
|
||||||
.onEdit = [&] { main.g.window_update(); }
|
.onEdit = [&] { main.g.window_update(); }
|
||||||
|
|
@ -1551,10 +1557,8 @@ void Toolbar::general_settings_inner_gui() {
|
||||||
main.conf.update_main_loop_call_rate();
|
main.conf.update_main_loop_call_rate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
checkbox_boolean_field(gui, "real time eraser", "Eraser works in real time", &main.conf.realTimeEraser);
|
|
||||||
checkbox_boolean_field(gui, "force extension on path", "Force extension on path when saving files", &main.conf.forceExtensionOnPath);
|
|
||||||
#ifndef __EMSCRIPTEN__
|
#ifndef __EMSCRIPTEN__
|
||||||
|
checkbox_boolean_field(gui, "disable graphics driver workarounds", "Disable graphics driver workarounds (enabling or disabling this might fix some graphical glitches, requires restart)", &main.conf.disableGraphicsDriverWorkarounds);
|
||||||
checkbox_boolean_field(gui, "apply display scale", "Apply display scale", &main.conf.applyDisplayScale);
|
checkbox_boolean_field(gui, "apply display scale", "Apply display scale", &main.conf.applyDisplayScale);
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@ class Toolbar {
|
||||||
} optionsMenuType;
|
} optionsMenuType;
|
||||||
enum GeneralSettingsOptions {
|
enum GeneralSettingsOptions {
|
||||||
GSETTINGS_GENERAL = 0,
|
GSETTINGS_GENERAL = 0,
|
||||||
|
GSETTINGS_GRAPHICS,
|
||||||
GSETTINGS_TABLET,
|
GSETTINGS_TABLET,
|
||||||
GSETTINGS_THEME,
|
GSETTINGS_THEME,
|
||||||
GSETTINGS_KEYBINDS,
|
GSETTINGS_KEYBINDS,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue