summaryrefslogtreecommitdiff
path: root/src/resources/theme.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-01-21 09:25:46 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-01-21 09:29:23 +0100
commite224a015dbb69db35a9403f40ede7fc397d549fc (patch)
tree97bb25d8302ef3cc60077383abd3076753f34b71 /src/resources/theme.cpp
parentdb9b9f316d7bdcb9504092908bb18e82fc21de2f (diff)
downloadmana-e224a015dbb69db35a9403f40ede7fc397d549fc.tar.gz
mana-e224a015dbb69db35a9403f40ede7fc397d549fc.tar.bz2
mana-e224a015dbb69db35a9403f40ede7fc397d549fc.tar.xz
mana-e224a015dbb69db35a9403f40ede7fc397d549fc.zip
Fixed ConfigOptionChanged events
With the statically typed config we no longer get an event for each changed config value. Where relevant, this is now done through `setConfigValue`. The `Event` now uses a `std::any`, which for `ConfigOptionChanged` events is set to the changed `Config` member. This allows for a type-safe check on which config value was changed.
Diffstat (limited to 'src/resources/theme.cpp')
-rw-r--r--src/resources/theme.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index 1f7322a6..ad686e19 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -205,7 +205,7 @@ void Theme::event(Event::Channel channel, const Event &event)
{
if (channel == Event::ConfigChannel &&
event.getType() == Event::ConfigOptionChanged &&
- event.getString("option") == "guialpha")
+ event.hasValue(&Config::guiAlpha))
{
updateAlpha();
}