From 4ea3c90b5b08cd4ff54cb65b4b2842f665eec29a Mon Sep 17 00:00:00 2001 From: Areloch Date: Sun, 15 Oct 2017 04:02:43 -0500 Subject: [PATCH] Adds a function to get the cursor position in local coords --- Engine/source/gui/core/guiCanvas.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine/source/gui/core/guiCanvas.h b/Engine/source/gui/core/guiCanvas.h index 7775b8af0..dfc98da38 100644 --- a/Engine/source/gui/core/guiCanvas.h +++ b/Engine/source/gui/core/guiCanvas.h @@ -334,6 +334,9 @@ public: /// Returns the point, in screenspace, at which the cursor is located. virtual Point2I getCursorPos(); + /// Returns the point, in local coordinates, at which the cursor is located + virtual Point2I getCursorPosLocal() { return Point2I(S32(mCursorPt.x), S32(mCursorPt.y)); } + /// Enable/disable rendering of the cursor. /// @param state True if we should render cursor virtual void showCursor(bool state);