diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-19 08:52:35 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-19 08:52:35 +1000 |
commit | d5f5fb5ddf0d4a9f0b0e6ac012121926d2fcd949 (patch) | |
tree | 5f1bca917aacc2bb22d0ac00857edb15b134add2 /source/frontend | |
parent | 9533c8d0a50c2e09d4880776f5ddfda2b7482c32 (diff) |
Add hardware cursor game setting
Diffstat (limited to 'source/frontend')
-rw-r--r-- | source/frontend/StarGraphicsMenu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/frontend/StarGraphicsMenu.cpp b/source/frontend/StarGraphicsMenu.cpp index 210b318..a3d78e7 100644 --- a/source/frontend/StarGraphicsMenu.cpp +++ b/source/frontend/StarGraphicsMenu.cpp @@ -80,6 +80,12 @@ GraphicsMenu::GraphicsMenu() { Root::singleton().configuration()->set("antiAliasing", checked); syncGui(); }); + reader.registerCallback("hardwareCursorCheckbox", [=](Widget*) { + bool checked = fetchChild<ButtonWidget>("hardwareCursorCheckbox")->isChecked(); + m_localChanges.set("hardwareCursor", checked); + Root::singleton().configuration()->set("hardwareCursor", checked); + GuiContext::singleton().applicationController()->setCursorHardware(checked); + }); reader.registerCallback("monochromeCheckbox", [=](Widget*) { bool checked = fetchChild<ButtonWidget>("monochromeCheckbox")->isChecked(); m_localChanges.set("monochromeLighting", checked); @@ -146,6 +152,7 @@ StringList const GraphicsMenu::ConfigKeys = { "limitTextureAtlasSize", "useMultiTexturing", "antiAliasing", + "hardwareCursor", "monochromeLighting", "newObjectLighting" }; @@ -204,6 +211,7 @@ void GraphicsMenu::syncGui() { fetchChild<ButtonWidget>("antiAliasingCheckbox")->setChecked(m_localChanges.get("antiAliasing").toBool()); fetchChild<ButtonWidget>("monochromeCheckbox")->setChecked(m_localChanges.get("monochromeLighting").toBool()); fetchChild<ButtonWidget>("objectLightingCheckbox")->setChecked(m_localChanges.get("newObjectLighting").optBool().value(true)); + fetchChild<ButtonWidget>("hardwareCursorCheckbox")->setChecked(m_localChanges.get("hardwareCursor").toBool()); } void GraphicsMenu::apply() { |