fix: Achievement popup setting only being read once at startup

This commit is contained in:
WerWolv
2025-08-31 17:31:16 +02:00
parent 715e970d99
commit 16dc199431

View File

@@ -33,14 +33,18 @@ namespace hex::plugin::builtin {
}
});
// Load settings
{
bool defaultValue = true;
#if defined(OS_WEB)
defaultValue = false;
m_showPopup = false;
#else
m_showPopup = true;
#endif
m_showPopup = ContentRegistry::Settings::read<bool>("hex.builtin.setting.interface", "hex.builtin.setting.interface.achievement_popup", defaultValue);
ContentRegistry::Settings::onChange("hex.builtin.setting.interface", "hex.builtin.setting.interface.achievement_popup", [this](const ContentRegistry::Settings::SettingsValue &value) {
m_showPopup = value.get<bool>(true);
});
}
}