MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / just_pressed

Method just_pressed

src/engine.rs:5734–5740  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

5732 }
5733
5734 pub fn just_pressed(&self) -> bool {
5735 let open_idx = self.get_open_layout_element();
5736 let elem_id = self.layout_elements[open_idx].id;
5737 self.pressed_element_ids.iter().any(|eid| eid.id == elem_id)
5738 && (self.pointer_info.state == PointerDataInteractionState::PressedThisFrame
5739 || self.keyboard_press_this_frame_generation == self.generation)
5740 }
5741
5742 pub fn just_released(&self) -> bool {
5743 if self.released_this_frame_generation != self.generation {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected