diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-08 14:22:22 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-08 14:22:22 +1000 |
commit | 8a8a0501590e83cbc598c7491fca0b767094466f (patch) | |
tree | 4fd806e646179fa9a7e4027cc60e19492d003ade /source/frontend/StarGraphicsMenu.cpp | |
parent | 4458d2e85ed7f9e373af290dbe8063a52d2824b5 (diff) |
2 features: multi-sample anti-aliasing & Lua patches for images
Diffstat (limited to 'source/frontend/StarGraphicsMenu.cpp')
-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 f1a93a9..0a87ef6 100644 --- a/source/frontend/StarGraphicsMenu.cpp +++ b/source/frontend/StarGraphicsMenu.cpp @@ -74,6 +74,12 @@ GraphicsMenu::GraphicsMenu() { m_localChanges.set("useMultiTexturing", fetchChild<ButtonWidget>("multiTextureCheckbox")->isChecked()); syncGui(); }); + reader.registerCallback("antiAliasingCheckbox", [=](Widget*) { + bool checked = fetchChild<ButtonWidget>("antiAliasingCheckbox")->isChecked(); + m_localChanges.set("antiAliasing", checked); + Root::singleton().configuration()->set("antiAliasing", checked); + syncGui(); + }); reader.registerCallback("monochromeCheckbox", [=](Widget*) { bool checked = fetchChild<ButtonWidget>("monochromeCheckbox")->isChecked(); m_localChanges.set("monochromeLighting", checked); @@ -133,6 +139,7 @@ StringList const GraphicsMenu::ConfigKeys = { "borderless", "limitTextureAtlasSize", "useMultiTexturing", + "antiAliasing", "monochromeLighting" }; @@ -187,6 +194,7 @@ void GraphicsMenu::syncGui() { fetchChild<ButtonWidget>("borderlessCheckbox")->setChecked(m_localChanges.get("borderless").toBool()); fetchChild<ButtonWidget>("textureLimitCheckbox")->setChecked(m_localChanges.get("limitTextureAtlasSize").toBool()); fetchChild<ButtonWidget>("multiTextureCheckbox")->setChecked(m_localChanges.get("useMultiTexturing").optBool().value(true)); + fetchChild<ButtonWidget>("antiAliasingCheckbox")->setChecked(m_localChanges.get("antiAliasing").toBool()); fetchChild<ButtonWidget>("monochromeCheckbox")->setChecked(m_localChanges.get("monochromeLighting").toBool()); } |