Switch TouchInputFlags to enum class, fix some minor UI issues

Scroll views now only wheel-scroll if the mouse is hovering over them.
This commit is contained in:
Henrik Rydgård committed 2025-12-19 11:38:56 +01:00
1 parent dd112491db
commit 481d0fd18c
84 files changed
+265 -186

No files matched your search

+2 -2
View File
@@ -139,10 +139,10 @@ public:
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)) {
if (hovering_ && (input.flags & TouchInputFlags::DOWN)) {
holdStart_ = time_now_d();
}
if (input.flags & TOUCH_UP) {
if (input.flags & TouchInputFlags::UP) {
holdStart_ = 0;
}
return retval;