Add Platform::GetMousePosition/WindowsPlatform::SetMousePosition for unified access to screen-space mouse position on all platforms

#1109
This commit is contained in:
Wojtek Figat
2023-05-28 15:30:16 +02:00
parent 482d516c2e
commit 9cdd1cbc45
10 changed files with 45 additions and 33 deletions

View File

@@ -660,6 +660,18 @@ public:
public:
/// <summary>
/// Gets the mouse cursor position in screen-space coordinates.
/// </summary>
/// <returns>Mouse cursor coordinates.</returns>
API_PROPERTY() static Float2 GetMousePosition();
/// <summary>
/// Sets the mouse cursor position in screen-space coordinates.
/// </summary>
/// <param name="position">Cursor position to set.</param>
API_PROPERTY() static void SetMousePosition(const Float2& position);
/// <summary>
/// Gets the origin position and size of the monitor at the given screen-space location.
/// </summary>