Some other bullshit

This commit is contained in:
2026-09-12 14:55:40 +02:00
parent 74a635785e
commit 6e01147125
21 changed files with 206 additions and 89 deletions
+13 -6
View File
@@ -91,10 +91,14 @@ impl MenuInput {
self.accept.accumulate(&other.accept);
self.back.accumulate(&other.back);
self.start.accumulate(&other.start);
self.movement_digital_up.accumulate(&other.movement_digital_up);
self.movement_digital_down.accumulate(&other.movement_digital_down);
self.movement_digital_left.accumulate(&other.movement_digital_left);
self.movement_digital_right.accumulate(&other.movement_digital_right);
self.movement_digital_up
.accumulate(&other.movement_digital_up);
self.movement_digital_down
.accumulate(&other.movement_digital_down);
self.movement_digital_left
.accumulate(&other.movement_digital_left);
self.movement_digital_right
.accumulate(&other.movement_digital_right);
self.movement = self.movement.clamp_length_max(1.0);
}
}
@@ -247,9 +251,12 @@ pub fn sample_menu_inputs(
state
.inputs
.push((LocalInputSource::Keyboard, keyboard_input(&key, &map)));
let mut prev_joystick_states: Vec<(LocalInputSource, MenuJoystickState)> = vec![];
std::mem::swap(&mut prev_joystick_states, &mut state.prev_frame_joystick_state);
std::mem::swap(
&mut prev_joystick_states,
&mut state.prev_frame_joystick_state,
);
for (entity, pad) in pads.iter() {
let local_source = LocalInputSource::Gamepad(entity);