瀏覽代碼

Engine GUI: Don't translate mouse coordinates in GuiCanvas::setCursorPos()

Removed translating passed mouse pointer coordinates from client to screen space. Source comments and exposed canvas script API help doc line for the same function states that passed mouse pointer coordinates are supposed to already be in screen space.
dottools 3 年之前
父節點
當前提交
01a3163d40
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Engine/source/gui/core/guiCanvas.cpp

+ 1 - 2
Engine/source/gui/core/guiCanvas.cpp

@@ -549,8 +549,7 @@ void GuiCanvas::setCursorPos(const Point2I &pt)
    }
    }
    else
    else
    {
    {
-      Point2I screenPt( mPlatformWindow->clientToScreen( pt ) );
-      mPlatformWindow->setCursorPosition( screenPt.x, screenPt.y ); 
+      mPlatformWindow->setCursorPosition(pt.x, pt.y);
    }
    }
 }
 }