Fix button up and down events with focus changes

Adds a flag to guard button_up and button_down events based on whether
button_down has been previously emitted. Buttons now emit button_up
signals if they have emitted button_down and subsequently lose focus,
do not emit button_up if they gain focus while ui_accept is still
pressed, and do not emit multiple up/down signals if multiple
ui_accept keys are pressed simultaneously.
This commit is contained in:
Mark Wilson 2023-09-10 22:13:04 -04:00
parent 506d6e427a
commit 6a12fac44c
2 changed files with 10 additions and 3 deletions

View file

@ -61,7 +61,7 @@ private:
bool hovering = false;
bool press_attempt = false;
bool pressing_inside = false;
bool pressed_down_with_focus = false;
bool disabled = false;
} status;