MCPcopy Create free account
hub / github.com/CleanCut/rusty_engine / just_pressed_any

Method just_pressed_any

src/mouse.rs:61–70  ·  view source on GitHub ↗
(
        &self,
        mouse_buttons: &[MouseButton],
        mut then: impl FnMut(&MouseState),
    )

Source from the content-addressed store, hash-verified

59 /// Calls the closure if any of the indicated mouse buttons were just pressed this frame
60 #[inline]
61 pub fn just_pressed_any(
62 &self,
63 mouse_buttons: &[MouseButton],
64 mut then: impl FnMut(&MouseState),
65 ) -> &Self {
66 if self.0.just_pressed_any(mouse_buttons) {
67 then(&self.0);
68 }
69 self
70 }
71 /// Calls the closure if the mouse button started being released during the last frame
72 #[inline]
73 pub fn just_released(

Callers 1

game_logicFunction · 0.45

Calls 1

just_pressedMethod · 0.45

Tested by

no test coverage detected