From db9b9f316d7bdcb9504092908bb18e82fc21de2f Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 20 Jan 2025 10:26:22 +0100 Subject: Made client config statically typed This makes accessing the config values much faster, since it no longer needs to do a lookup nor string conversion, which means we could remove some needless copying of the values. Overall it makes it easier to find out where settings are used and it puts the defaults along with the declaration. Options with default values are no longer saved to the config file. This does not include unrecognized options, which are kept around to provide some compatibility with older clients. While most basic options have kept the same name, more complicated settings like window geometry, shortcuts, outfits, etc. now have their own XML elements. Older clients will ignore these and erase them when saving the configuration. --- src/gui/widgets/checkbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/widgets/checkbox.cpp') diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 0554bad6..274855fd 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -89,7 +89,7 @@ void CheckBox::draw(gcn::Graphics* graphics) void CheckBox::updateAlpha() { - float alpha = std::max(config.getFloatValue("guialpha"), + float alpha = std::max(config.guiAlpha, Theme::instance()->getMinimumOpacity()); if (mAlpha != alpha) -- cgit v1.2.3-70-g09d2