MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMousePosition

Function GetMousePosition

Source/Engine/Platform/SDL/SDLPlatform.Mac.cpp:318–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318Float2 GetMousePosition(SDLWindow* window, NSEvent* event)
319{
320 NSRect frame = [(NSWindow*)window->GetNativePtr() frame];
321 NSPoint point = [event locationInWindow];
322 return Float2(point.x, frame.size.height - point.y) * MacPlatform::ScreenScale - GetWindowTitleSize(window);
323}
324
325Float2 GetMousePosition(SDLWindow* window, const NSPoint& point)
326{

Callers 3

HandleEventInternalMethod · 0.70
DoDragDropWaylandMethod · 0.70

Calls 2

Float2Class · 0.85
GetWindowTitleSizeFunction · 0.85

Tested by

no test coverage detected