cleanup
This commit is contained in:
parent
7800e8d5fe
commit
3fdcb50694
1 changed files with 2 additions and 3 deletions
|
@ -103,7 +103,6 @@ type InputMap = BTreeMap<ActionId, Vec<Binding>>;
|
||||||
pub struct Input {
|
pub struct Input {
|
||||||
bindings: [Vec<Binding>; ActionId::SIZE],
|
bindings: [Vec<Binding>; ActionId::SIZE],
|
||||||
states: [BindingState; ActionId::SIZE],
|
states: [BindingState; ActionId::SIZE],
|
||||||
#[serde(skip)]
|
|
||||||
editing_binding: Option<(ActionId, usize, BindingEdit)>,
|
editing_binding: Option<(ActionId, usize, BindingEdit)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,8 +294,8 @@ pub struct Binding {
|
||||||
impl From<InputMap> for Input {
|
impl From<InputMap> for Input {
|
||||||
fn from(value: InputMap) -> Self {
|
fn from(value: InputMap) -> Self {
|
||||||
let mut new = Self::default();
|
let mut new = Self::default();
|
||||||
for (action, saved_bindings) in value {
|
for (action, loaded_bindings) in value {
|
||||||
new.bindings[action as usize] = saved_bindings;
|
new.bindings[action as usize] = loaded_bindings;
|
||||||
}
|
}
|
||||||
new
|
new
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue