feat: space drag multiplier

This commit is contained in:
galister
2024-06-17 14:36:21 +09:00
parent abc132c553
commit c7aa88647c
5 changed files with 21 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ pub enum LabelContent {
low_color: Arc<str>,
charging_color: Arc<str>,
},
DragMultiplier,
Ipd,
}
@@ -66,6 +67,7 @@ pub enum LabelData {
Ipd {
last_ipd: f32,
},
DragMultiplier,
}
pub fn modular_label_init(label: &mut ModularControl, content: &LabelContent) {
@@ -111,6 +113,7 @@ pub fn modular_label_init(label: &mut ModularControl, content: &LabelContent) {
None
}
LabelContent::Ipd => Some(LabelData::Ipd { last_ipd: 0. }),
LabelContent::DragMultiplier => Some(LabelData::DragMultiplier),
};
if let Some(state) = state {
@@ -249,5 +252,8 @@ pub(super) fn label_update(control: &mut ModularControl, _: &mut (), app: &mut A
control.set_text(&format!("{:.1}", app.input_state.ipd));
}
}
LabelData::DragMultiplier => {
control.set_text(&format!("{:.1}", app.session.config.space_drag_multiplier));
}
}
}