Browse Source

Merge remote-tracking branch 'upstream/development' into development

marauder2k7 4 years ago
parent
commit
387fab3663

+ 22 - 0
engine/source/gui/containers/guiTabPageCtrl.cc

@@ -178,3 +178,25 @@ void GuiTabPageCtrl::selectWindow(void)
    //also set the first responder to be the one within this window
    setFirstResponder(mFirstResponder);
 }
+
+void GuiTabPageCtrl::onRender(Point2I offset, const RectI &updateRect)
+{
+	RectI ctrlRect = applyMargins(offset, mBounds.extent, NormalState, mProfile);
+
+	if (!ctrlRect.isValidRect())
+	{
+		return;
+	}
+
+	renderUniversalRect(ctrlRect, mProfile, NormalState);
+
+	//Render Text
+	RectI fillRect = applyBorders(ctrlRect.point, ctrlRect.extent, NormalState, mProfile);
+	RectI contentRect = applyPadding(fillRect.point, fillRect.extent, NormalState, mProfile);
+
+	if (contentRect.isValidRect())
+	{
+		//Render the childen
+		renderChildControls(offset, contentRect, updateRect);
+	}
+}

+ 1 - 0
engine/source/gui/containers/guiTabPageCtrl.h

@@ -52,6 +52,7 @@ class GuiTabPageCtrl : public GuiControl
       void selectWindow(void);               ///< Select this window
 
       virtual void setText(const char *txt = NULL); ///< Override setText function to signal parent we need to update.
+	  void onRender(Point2I offset, const RectI &updateRect);
 };
 
 #endif //_GUITABPAGECTRL_H_

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

@@ -89,7 +89,9 @@ void GuiWindowCtrl::initPersistFields()
    addField("canClose",          TypeBool,         Offset(mCanClose, GuiWindowCtrl));
    addField("canMinimize",       TypeBool,         Offset(mCanMinimize, GuiWindowCtrl));
    addField("canMaximize",       TypeBool,         Offset(mCanMaximize, GuiWindowCtrl));
-   addField("titleHeight",		TypeS32,           Offset(mTitleHeight, GuiWindowCtrl));
+   addField("titleHeight",			TypeS32,		Offset(mTitleHeight, GuiWindowCtrl));
+   addField("resizeRightWidth",		TypeS32,		Offset(mResizeRightWidth, GuiWindowCtrl));
+   addField("resizeBottomHeight",	TypeS32,		Offset(mResizeBottomHeight, GuiWindowCtrl));
    addField("contentProfile", TypeGuiProfile, Offset(mContentProfile, GuiWindowCtrl));
    addField("closeButtonProfile", TypeGuiProfile, Offset(mCloseButtonProfile, GuiWindowCtrl));
    addField("minButtonProfile", TypeGuiProfile, Offset(mMinButtonProfile, GuiWindowCtrl));
@@ -644,12 +646,6 @@ void GuiWindowCtrl::onRender(Point2I offset, const RectI &updateRect)
 	else if (hasFocus)
 	{
 		currentState = SelectedState;
-
-		GuiControl *parent = getParent();
-		if (parent)
-		{
-			parent->pushObjectToBack(this);
-		}
 	}
 	else if (curHitRegion == TitleBar)
 	{