MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / release_touch

Method release_touch

native/shared/src/input.rs:243–249  ·  view source on GitHub ↗

Deferred release: keeps the slot active for the current frame and clears it at `end_frame`. Call from platform event loops on ACTION_UP so a DOWN+UP that falls inside one frame remains visible to the game.

(&mut self, index: usize, x: f64, y: f64)

Source from the content-addressed store, hash-verified

241 /// clears it at `end_frame`. Call from platform event loops on ACTION_UP
242 /// so a DOWN+UP that falls inside one frame remains visible to the game.
243 pub fn release_touch(&mut self, index: usize, x: f64, y: f64) {
244 if index < MAX_TOUCH_POINTS {
245 self.touch_points[index].x = x;
246 self.touch_points[index].y = y;
247 self.touch_pending_release[index] = true;
248 }
249 }
250 pub fn get_touch_x(&self, index: usize) -> f64 {
251 if index < MAX_TOUCH_POINTS { self.touch_points[index].x } else { 0.0 }
252 }

Callers 1

bloom_android_on_touchFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected