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

@@ -26,9 +26,8 @@ protected:
public:
/// <summary>
/// Gets the text entered during the current frame.
/// Gets the text entered during the current frame (Unicode format).
/// </summary>
/// <returns>The input text (Unicode).</returns>
API_PROPERTY() StringView GetInputText() const
{
return StringView(_state.InputText, _state.InputTextLength);

View File

@@ -58,7 +58,6 @@ public:
/// <summary>
/// Gets the position of the mouse in the screen-space coordinates.
/// </summary>
/// <returns>The mouse position</returns>
API_PROPERTY() FORCE_INLINE Float2 GetPosition() const
{
return _state.MousePosition;
@@ -72,7 +71,6 @@ public:
/// <summary>
/// Gets the delta position of the mouse in the screen-space coordinates.
/// </summary>
/// <returns>The mouse position delta</returns>
API_PROPERTY() FORCE_INLINE Float2 GetPositionDelta() const
{
return _state.MousePosition - _prevState.MousePosition;
@@ -81,7 +79,6 @@ public:
/// <summary>
/// Gets the mouse wheel change during the last frame.
/// </summary>
/// <returns>Mouse wheel value delta</returns>
API_PROPERTY() FORCE_INLINE float GetScrollDelta() const
{
return _state.MouseWheelDelta;