소스 검색

Update guiWindowCtrl.cc

Fixed the calculation for showing the resize handles. Handles no longer interfere with the close button.
Peter Robinson 4 년 전
부모
커밋
70638747d9
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      engine/source/gui/containers/guiWindowCtrl.cc

+ 3 - 2
engine/source/gui/containers/guiWindowCtrl.cc

@@ -867,8 +867,9 @@ void GuiWindowCtrl::getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEve
 {
 	Point2I mousePos  = lastGuiEvent.mousePoint;
 	RectI winRect   = mBounds;
-	RectI rightRect = RectI( ( ( winRect.extent.x + winRect.point.x ) - mResizeRightWidth), winRect.point.y, mResizeRightWidth, winRect.extent.y );
-	RectI bottomRect = RectI( winRect.point.x, ( ( winRect.point.y + winRect.extent.y ) - mResizeBottomHeight), winRect.extent.x , mResizeBottomHeight );
+	Point2I offset = getParent()->localToGlobalCoord(Point2I(0,0));
+	RectI rightRect = RectI( ( ( winRect.extent.x + winRect.point.x ) - mResizeRightWidth + offset.x), winRect.point.y + mTitleHeight + offset.y, mResizeRightWidth, winRect.extent.y );
+	RectI bottomRect = RectI( winRect.point.x + offset.x, ( ( winRect.point.y + winRect.extent.y ) - mResizeBottomHeight) + offset.y, winRect.extent.x , mResizeBottomHeight );
 
 	bool resizeRight = rightRect.pointInRect( mousePos );
 	bool resizeBottom = bottomRect.pointInRect( mousePos );