MCPcopy Create free account
hub / github.com/PerroEngine/Perro / pressed_hash

Method pressed_hash

perro_source/api_modules/perro_input_api/src/input_map.rs:155–169  ·  view source on GitHub ↗
(
        &self,
        name_hash: u64,
        keyboard: &KeyboardState,
        mouse: &MouseState,
        gamepads: &[GamepadState],
        joycons: &[JoyConState],
    )

Source from the content-addressed store, hash-verified

153 pub fn down_hash(
154 &self,
155 name_hash: u64,
156 keyboard: &KeyboardState,
157 mouse: &MouseState,
158 gamepads: &[GamepadState],
159 joycons: &[JoyConState],
160 ) -> bool {
161 self.action_by_hash(name_hash).is_some_and(|action| {
162 action
163 .bindings
164 .iter()
165 .any(|binding| binding.down(keyboard, mouse, gamepads, joycons))
166 })
167 }
168
169 #[inline]
170 pub fn pressed_hash(
171 &self,
172 name_hash: u64,

Callers 1

pressedMethod · 0.45

Calls 4

action_by_hashMethod · 0.80
anyMethod · 0.80
iterMethod · 0.45
pressedMethod · 0.45

Tested by

no test coverage detected