mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
save radar toolbox dock's visibility on exit
This commit is contained in:
parent
3ab18392b3
commit
3789845a36
3 changed files with 31 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ public:
|
|||
mapSettingsExpanded_.SetDefault(true);
|
||||
timelineExpanded_.SetDefault(true);
|
||||
alertDockVisible_.SetDefault(false);
|
||||
radarToolboxDockVisible_.SetDefault(true);
|
||||
}
|
||||
|
||||
~UiSettingsImpl() {}
|
||||
|
|
@ -30,6 +31,7 @@ public:
|
|||
SettingsVariable<bool> mapSettingsExpanded_ {"map_settings_expanded"};
|
||||
SettingsVariable<bool> timelineExpanded_ {"timeline_expanded"};
|
||||
SettingsVariable<bool> alertDockVisible_ {"alert_dock_visible"};
|
||||
SettingsVariable<bool> radarToolboxDockVisible_ {"radar_toolbox_dock_visible"};
|
||||
};
|
||||
|
||||
UiSettings::UiSettings() :
|
||||
|
|
@ -40,7 +42,8 @@ UiSettings::UiSettings() :
|
|||
&p->level3ProductsExpanded_,
|
||||
&p->mapSettingsExpanded_,
|
||||
&p->timelineExpanded_,
|
||||
&p->alertDockVisible_});
|
||||
&p->alertDockVisible_,
|
||||
&p->radarToolboxDockVisible_});
|
||||
SetDefaults();
|
||||
}
|
||||
UiSettings::~UiSettings() = default;
|
||||
|
|
@ -78,6 +81,12 @@ SettingsVariable<bool>& UiSettings::alert_dock_visible() const
|
|||
return p->alertDockVisible_;
|
||||
}
|
||||
|
||||
SettingsVariable<bool>& UiSettings::radar_toolbox_dock_visible() const
|
||||
{
|
||||
return p->radarToolboxDockVisible_;
|
||||
}
|
||||
|
||||
|
||||
bool UiSettings::Shutdown()
|
||||
{
|
||||
bool dataChanged = false;
|
||||
|
|
@ -89,6 +98,7 @@ bool UiSettings::Shutdown()
|
|||
dataChanged |= p->mapSettingsExpanded_.Commit();
|
||||
dataChanged |= p->timelineExpanded_.Commit();
|
||||
dataChanged |= p->alertDockVisible_.Commit();
|
||||
dataChanged |= p->radarToolboxDockVisible_.Commit();
|
||||
|
||||
return dataChanged;
|
||||
}
|
||||
|
|
@ -106,7 +116,8 @@ bool operator==(const UiSettings& lhs, const UiSettings& rhs)
|
|||
lhs.p->level3ProductsExpanded_ == rhs.p->level3ProductsExpanded_ &&
|
||||
lhs.p->mapSettingsExpanded_ == rhs.p->mapSettingsExpanded_ &&
|
||||
lhs.p->timelineExpanded_ == rhs.p->timelineExpanded_ &&
|
||||
lhs.p->alertDockVisible_ == rhs.p->alertDockVisible_);
|
||||
lhs.p->alertDockVisible_ == rhs.p->alertDockVisible_ &&
|
||||
lhs.p->radarToolboxDockVisible_ == rhs.p->radarToolboxDockVisible_);
|
||||
}
|
||||
|
||||
} // namespace settings
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ public:
|
|||
SettingsVariable<bool>& map_settings_expanded() const;
|
||||
SettingsVariable<bool>& timeline_expanded() const;
|
||||
SettingsVariable<bool>& alert_dock_visible() const;
|
||||
SettingsVariable<bool>& radar_toolbox_dock_visible() const;
|
||||
|
||||
bool Shutdown();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue