mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
impr: Rework setting change listeners
This commit is contained in:
@@ -16,8 +16,8 @@ namespace hex::plugin::windows {
|
||||
void addFooterItems() {
|
||||
|
||||
static bool showResourceUsage = true;
|
||||
EventSettingsChanged::subscribe([]{
|
||||
showResourceUsage = ContentRegistry::Settings::read<bool>("hex.builtin.setting.interface", "hex.builtin.setting.interface.show_resource_usage", true);
|
||||
ContentRegistry::Settings::onChange("hex.builtin.setting.interface", "hex.builtin.setting.interface.show_resource_usage", [](const ContentRegistry::Settings::SettingsValue &value) {
|
||||
showResourceUsage = value.get<bool>(false);
|
||||
});
|
||||
|
||||
ContentRegistry::Interface::addFooterItem([] {
|
||||
|
||||
Reference in New Issue
Block a user