Scrollview: Disallow scrolling with mouse buttons other than the first.

Some logging cleanup
This commit is contained in:
Henrik Rydgård committed 2026-02-23 11:48:11 +01:00
1 parent 74053b4293
commit 16a79e12b6
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -143,6 +143,11 @@ const float friction = 0.92f;
const float stop_threshold = 0.1f;
bool ScrollView::Touch(const TouchInput &input) {
// Ignore buttons other than the left one.
if ((input.flags & TouchInputFlags::MOUSE) && (input.buttons & 1) == 0) {
return false;
}
if ((input.flags & TouchInputFlags::DOWN) && scrollTouchId_ == -1 && bounds_.Contains(input.x, input.y)) {
if (orientation_ == ORIENT_VERTICAL) {
Bob bob = ComputeBob();