diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-15 08:03:26 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-15 08:03:26 +1000 |
commit | 227e60ca4c927ed9f6b7db5e5c53c45addd1428b (patch) | |
tree | 5a8a080c4d60084bfb864252407cd4fc145926a3 /source/frontend/StarGraphicsMenu.cpp | |
parent | ed8b22c472b9159550ade374328092d15b575ade (diff) |
new object lighting toggle, log non-master entity render/update exceptions
Diffstat (limited to 'source/frontend/StarGraphicsMenu.cpp')
-rw-r--r-- | source/frontend/StarGraphicsMenu.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/frontend/StarGraphicsMenu.cpp b/source/frontend/StarGraphicsMenu.cpp index 0a87ef6..210b318 100644 --- a/source/frontend/StarGraphicsMenu.cpp +++ b/source/frontend/StarGraphicsMenu.cpp @@ -86,6 +86,12 @@ GraphicsMenu::GraphicsMenu() { Root::singleton().configuration()->set("monochromeLighting", checked); syncGui(); }); + reader.registerCallback("objectLightingCheckbox", [=](Widget*) { + bool checked = fetchChild<ButtonWidget>("objectLightingCheckbox")->isChecked(); + m_localChanges.set("newObjectLighting", checked); + Root::singleton().configuration()->set("newObjectLighting", checked); + syncGui(); + }); auto assets = Root::singleton().assets(); @@ -140,7 +146,8 @@ StringList const GraphicsMenu::ConfigKeys = { "limitTextureAtlasSize", "useMultiTexturing", "antiAliasing", - "monochromeLighting" + "monochromeLighting", + "newObjectLighting" }; void GraphicsMenu::initConfig() { @@ -196,6 +203,7 @@ void GraphicsMenu::syncGui() { 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()); + fetchChild<ButtonWidget>("objectLightingCheckbox")->setChecked(m_localChanges.get("newObjectLighting").optBool().value(true)); } void GraphicsMenu::apply() { |