瀏覽代碼

Fixed dock slider so it renderers again

Marko Pintera 11 年之前
父節點
當前提交
8c665ec329

+ 7 - 0
BansheeEditor/Source/BsDockManager.cpp

@@ -97,6 +97,7 @@ namespace BansheeEditor
 	{
 	{
 		if(!mIsLeaf && mChildren[0] != nullptr && mChildren[1] != nullptr)
 		if(!mIsLeaf && mChildren[0] != nullptr && mChildren[1] != nullptr)
 		{
 		{
+			RectI clipRect = mArea;
 			if(mIsHorizontal)
 			if(mIsHorizontal)
 			{
 			{
 				UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.height - (INT32)SLIDER_SIZE);
 				UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.height - (INT32)SLIDER_SIZE);
@@ -109,6 +110,9 @@ namespace BansheeEditor
 				mSlider->_setOffset(Vector2I(mArea.x, mArea.y + sizeTop));
 				mSlider->_setOffset(Vector2I(mArea.x, mArea.y + sizeTop));
 				mSlider->_setWidth(mArea.width);
 				mSlider->_setWidth(mArea.width);
 				mSlider->_setHeight(SLIDER_SIZE);
 				mSlider->_setHeight(SLIDER_SIZE);
+
+				RectI elemClipRect(clipRect.x - mArea.x, clipRect.y - mArea.y, clipRect.width, clipRect.height);
+				mSlider->_setClipRect(elemClipRect);
 			}
 			}
 			else
 			else
 			{
 			{
@@ -122,6 +126,9 @@ namespace BansheeEditor
 				mSlider->_setOffset(Vector2I(mArea.x + sizeLeft, mArea.y));
 				mSlider->_setOffset(Vector2I(mArea.x + sizeLeft, mArea.y));
 				mSlider->_setWidth(SLIDER_SIZE);
 				mSlider->_setWidth(SLIDER_SIZE);
 				mSlider->_setHeight(mArea.height);
 				mSlider->_setHeight(mArea.height);
+
+				RectI elemClipRect(clipRect.x - mArea.x, clipRect.y - mArea.y, clipRect.width, clipRect.height);
+				mSlider->_setClipRect(elemClipRect);
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
BansheeEditor/Source/BsMainEditorWindow.cpp

@@ -110,6 +110,6 @@ namespace BansheeEditor
 	void MainEditorWindow::update()
 	void MainEditorWindow::update()
 	{
 	{
 		mDockManager->update();
 		mDockManager->update();
-		PROFILE_CALL(ProfilerOverlay::instance().update(), "ProfilerOverlay");
+		//PROFILE_CALL(ProfilerOverlay::instance().update(), "ProfilerOverlay");
 	}
 	}
 }
 }

+ 3 - 0
CamelotCore/Include/CmCoreObject.h

@@ -50,6 +50,9 @@ o		 *
 		/**
 		/**
 		 * @brief	Returns true if the object has been properly initialized. You are not
 		 * @brief	Returns true if the object has been properly initialized. You are not
 		 * 			allowed to call any methods on the resource until you are sure resource is initialized.
 		 * 			allowed to call any methods on the resource until you are sure resource is initialized.
+		 * 			
+		 * @note	Normally CPU objects are initialized on creation and this will never be false, and GPU
+		 * 			objects are initialized when the Core Thread processes them.
 		 */
 		 */
 		bool isInitialized() const { return (mFlags & CGO_INITIALIZED) != 0; }
 		bool isInitialized() const { return (mFlags & CGO_INITIALIZED) != 0; }