Fix drag-background-through-buttons problem by adding "touch exclusive" mode to viewgroups.

Not using universally because I don't want to debug all the issues...
This commit is contained in:
Henrik Rydgård committed 2022-11-27 16:16:18 +01:00
1 parent d310636eb4
commit 0a3d78221e
9 files changed
+111 -64

No files matched your search

+3 -2
View File
@@ -136,8 +136,8 @@ public:
void SetHoldEnabled(bool hold) {
holdEnabled_ = hold;
}
void Touch(const TouchInput &input) override {
UI::Clickable::Touch(input);
bool Touch(const TouchInput &input) override {
bool retval = UI::Clickable::Touch(input);
hovering_ = bounds_.Contains(input.x, input.y);
if (hovering_ && (input.flags & TOUCH_DOWN)) {
holdStart_ = time_now_d();
@@ -145,6 +145,7 @@ public:
if (input.flags & TOUCH_UP) {
holdStart_ = 0;
}
return retval;
}
bool Key(const KeyInput &key) override {