Kaynağa Gözat

Adds a function to get the cursor position in local coords

Areloch 8 yıl önce
ebeveyn
işleme
2fa0171894
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      Engine/source/gui/core/guiCanvas.h

+ 3 - 0
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);