Skip to content

Multitouch events support - #180

Open
kunitoki wants to merge 6 commits into
mainfrom
dev/touch_events
Open

Multitouch events support#180
kunitoki wants to merge 6 commits into
mainfrom
dev/touch_events

Conversation

@kunitoki

@kunitoki kunitoki commented Sep 3, 2026

Copy link
Copy Markdown
Owner
image

This pull request introduces comprehensive multitouch support across all platforms with touch hardware, improves the user experience for touch and mouse interactions, and adds a new example demonstrating these capabilities. The changes affect the core event system, UI documentation, and the graphics examples.

Multitouch support and event system enhancements:

  • Added full multitouch support: Each finger on a touch device now generates its own set of mouse events (mouseDown, mouseDrag, mouseUp) with a stable touch index and pressure information, allowing for independent tracking of multiple fingers. Touch pressure is now accessible via MouseEvent::getPressure(), and each finger is hit-tested independently. SDL's synthetic touch-to-mouse events are disabled to prevent duplicate event delivery. (CHANGELOG.md, yup_MouseEvent.cpp) [1] [2] [3] [4] [5] [6]

UI improvements and bug fixes:

  • Fixed a bug where the Slider component could remain in a hover state after a touch drag if the pointer was released outside its bounds; mouseUp now directly clears the hover state when appropriate. (CHANGELOG.md)

Documentation and examples:

  • Expanded documentation to explain multitouch handling, including code samples for tracking multiple fingers and implementing gestures like pinch-to-zoom. (component-basics.md)
  • Added a new "Touch Trails" example to the graphics examples, which visually demonstrates multitouch input by drawing colored trails for each finger or mouse pointer, with smooth fading and independent tracking. The example is integrated into the main demo application. (TouchTrails.h, main.cpp) [1] [2] [3]

lucio.asnaghi added 5 commits August 28, 2026 00:58
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.61%. Comparing base (ff8ad8e) to head (88fea07).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
+ Coverage   81.53%   81.61%   +0.08%     
==========================================
  Files         796      796              
  Lines       82695    82713      +18     
==========================================
+ Hits        67425    67508      +83     
+ Misses      15270    15205      -65     
Files with missing lines Coverage Δ
modules/yup_gui/mouse/yup_MouseEvent.cpp 92.63% <100.00%> (+1.27%) ⬆️
modules/yup_gui/mouse/yup_MouseEvent.h 100.00% <ø> (ø)
modules/yup_gui/widgets/yup_Slider.cpp 54.50% <100.00%> (+13.71%) ⬆️

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff8ad8e...88fea07. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

# Conflicts:
#	examples/graphics/source/main.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant