mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
forgot to add minimap to settings_change
This commit is contained in:
parent
56deb5919f
commit
4503d5160c
@ -388,8 +388,6 @@ pub enum Event {
|
||||
AssignLeader(Uid),
|
||||
RemoveBuff(BuffKind),
|
||||
UnlockSkill(Skill),
|
||||
MinimapShow(bool),
|
||||
MinimapFaceNorth(bool),
|
||||
RequestSiteInfo(SiteId),
|
||||
|
||||
SettingsChange(SettingsChange),
|
||||
@ -2195,10 +2193,14 @@ impl Hud {
|
||||
.set(self.ids.minimap, ui_widgets)
|
||||
{
|
||||
Some(minimap::Event::Show(show)) => {
|
||||
events.push(Event::MinimapShow(show));
|
||||
events.push(Event::SettingsChange(
|
||||
InterfaceChange::MinimapShow(show).into(),
|
||||
));
|
||||
},
|
||||
Some(minimap::Event::FaceNorth(should_face_north)) => {
|
||||
events.push(Event::MinimapFaceNorth(should_face_north))
|
||||
events.push(Event::SettingsChange(
|
||||
InterfaceChange::MinimapFaceNorth(should_face_north).into(),
|
||||
));
|
||||
},
|
||||
None => {},
|
||||
}
|
||||
|
@ -1195,14 +1195,6 @@ impl PlayState for SessionState {
|
||||
HudEvent::AssignLeader(uid) => {
|
||||
self.client.borrow_mut().assign_group_leader(uid);
|
||||
},
|
||||
HudEvent::MinimapShow(state) => {
|
||||
global_state.settings.interface.minimap_show = state;
|
||||
global_state.settings.save_to_file_warn();
|
||||
},
|
||||
HudEvent::MinimapFaceNorth(state) => {
|
||||
global_state.settings.interface.minimap_face_north = state;
|
||||
global_state.settings.save_to_file_warn();
|
||||
},
|
||||
HudEvent::SettingsChange(settings_change) => {
|
||||
settings_change.process(global_state, self);
|
||||
},
|
||||
|
@ -95,6 +95,9 @@ pub enum Interface {
|
||||
BuffPosition(BuffPosition),
|
||||
|
||||
UiScale(ScaleChange),
|
||||
//Minimap
|
||||
MinimapShow(bool),
|
||||
MinimapFaceNorth(bool),
|
||||
//Map settings
|
||||
MapZoom(f64),
|
||||
MapDrag(Vec2<f64>),
|
||||
@ -394,6 +397,12 @@ impl SettingsChange {
|
||||
Interface::UiScale(scale_change) => {
|
||||
settings.interface.ui_scale = session_state.hud.scale_change(scale_change);
|
||||
},
|
||||
Interface::MinimapShow(state) => {
|
||||
settings.interface.minimap_show = state;
|
||||
},
|
||||
Interface::MinimapFaceNorth(state) => {
|
||||
settings.interface.minimap_face_north = state;
|
||||
},
|
||||
Interface::MapZoom(map_zoom) => {
|
||||
settings.interface.map_zoom = map_zoom;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user