From 8a8a0501590e83cbc598c7491fca0b767094466f Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 8 Apr 2024 14:22:22 +1000 Subject: 2 features: multi-sample anti-aliasing & Lua patches for images --- source/frontend/StarGraphicsMenu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/frontend/StarGraphicsMenu.cpp') 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("multiTextureCheckbox")->isChecked()); syncGui(); }); + reader.registerCallback("antiAliasingCheckbox", [=](Widget*) { + bool checked = fetchChild("antiAliasingCheckbox")->isChecked(); + m_localChanges.set("antiAliasing", checked); + Root::singleton().configuration()->set("antiAliasing", checked); + syncGui(); + }); reader.registerCallback("monochromeCheckbox", [=](Widget*) { bool checked = fetchChild("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("borderlessCheckbox")->setChecked(m_localChanges.get("borderless").toBool()); fetchChild("textureLimitCheckbox")->setChecked(m_localChanges.get("limitTextureAtlasSize").toBool()); fetchChild("multiTextureCheckbox")->setChecked(m_localChanges.get("useMultiTexturing").optBool().value(true)); + fetchChild("antiAliasingCheckbox")->setChecked(m_localChanges.get("antiAliasing").toBool()); fetchChild("monochromeCheckbox")->setChecked(m_localChanges.get("monochromeLighting").toBool()); } -- cgit v1.2.3