1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Backends: OSX: Added support for io.AddMouseSourceEvent(). (#6314)

Also marked "mouse" input in example_apple_metal's UIKit micro-backend as being touch input.

# Conflicts:
#	docs/CHANGELOG.txt
This commit is contained in:
David Maas 2023-04-09 14:41:53 -05:00 committed by ocornut
parent db4c4e3321
commit e92b29ad53
4 changed files with 35 additions and 1 deletions

View file

@ -228,6 +228,7 @@
UITouch *anyTouch = event.allTouches.anyObject;
CGPoint touchLocation = [anyTouch locationInView:self.view];
ImGuiIO &io = ImGui::GetIO();
io.AddMouseSourceEvent(ImGuiMouseSource_TouchScreen);
io.AddMousePosEvent(touchLocation.x, touchLocation.y);
BOOL hasActiveTouch = NO;