This commit is contained in:
Nilton Constantino 2026-01-14 09:22:05 +00:00
parent 5e6dd6d9c1
commit d2277fc4a9
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ pub struct InputSignals {
pub select_signal: bool,
// TOUCH
pub t_signal: bool,
pub f_signal: bool,
pub x_pos: i32,
pub y_pos: i32,
}

View File

@ -11,7 +11,7 @@ pub struct Touch {
impl Touch {
/// Flags transitórias devem durar apenas 1 frame.
pub fn begin_frame(&mut self, signals: &InputSignals) {
self.f.begin_frame(signals.t_signal);
self.f.begin_frame(signals.f_signal);
self.x = signals.x_pos;
self.y = signals.y_pos;
}

View File

@ -174,10 +174,10 @@ impl ApplicationHandler for PrometeuApp {
if button == MouseButton::Left {
match state {
ElementState::Pressed => {
self.input_signals.t_signal = true;
self.input_signals.f_signal = true;
}
ElementState::Released => {
self.input_signals.t_signal = false;
self.input_signals.f_signal = false;
}
}
}