Fixed correct handing of mouse position
This commit is contained in:
parent
56b3080702
commit
06da673585
@ -127,8 +127,9 @@
|
|||||||
NSWindow* window = [self window];
|
NSWindow* window = [self window];
|
||||||
NSRect originalFrame = [window frame];
|
NSRect originalFrame = [window frame];
|
||||||
NSPoint location = [window mouseLocationOutsideOfEventStream];
|
NSPoint location = [window mouseLocationOutsideOfEventStream];
|
||||||
|
NSRect adjustFrame = [NSWindow contentRectForFrameRect: originalFrame styleMask: NSTitledWindowMask];
|
||||||
|
|
||||||
Emgui_setMousePos((int)location.x, (int)originalFrame.size.height - (int)location.y);
|
Emgui_setMousePos((int)location.x, (int)adjustFrame.size.height - (int)location.y);
|
||||||
Editor_update();
|
Editor_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,8 +148,9 @@
|
|||||||
NSWindow *window = [self window];
|
NSWindow *window = [self window];
|
||||||
NSRect originalFrame = [window frame];
|
NSRect originalFrame = [window frame];
|
||||||
NSPoint location = [window mouseLocationOutsideOfEventStream];
|
NSPoint location = [window mouseLocationOutsideOfEventStream];
|
||||||
|
NSRect adjustFrame = [NSWindow contentRectForFrameRect: originalFrame styleMask: NSTitledWindowMask];
|
||||||
|
|
||||||
Emgui_setMousePos((int)location.x, (int)originalFrame.size.height - (int)location.y);
|
Emgui_setMousePos((int)location.x, (int)adjustFrame.size.height - (int)location.y);
|
||||||
Emgui_setMouseLmb(1);
|
Emgui_setMouseLmb(1);
|
||||||
|
|
||||||
Editor_update();
|
Editor_update();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user