Browse Source

Fixed content clipping in GUI scroll area
Console window entry list is now valid height

BearishSun 10 years ago
parent
commit
bb6fa6daf4
2 changed files with 8 additions and 7 deletions
  1. 1 0
      BansheeEngine/Source/BsGUIScrollArea.cpp
  2. 7 7
      MBansheeEditor/ConsoleWindow.cs

+ 1 - 0
BansheeEngine/Source/BsGUIScrollArea.cpp

@@ -299,6 +299,7 @@ namespace BansheeEngine
 			Rect2I layoutClipRect = data.clipRect;
 			Rect2I layoutClipRect = data.clipRect;
 			layoutClipRect.width = (UINT32)mVisibleSize.x;
 			layoutClipRect.width = (UINT32)mVisibleSize.x;
 			layoutClipRect.height = (UINT32)mVisibleSize.y;
 			layoutClipRect.height = (UINT32)mVisibleSize.y;
+			layoutClipRect.clip(data.clipRect);
 
 
 			GUILayoutData layoutData = data;
 			GUILayoutData layoutData = data;
 			layoutData.area = layoutBounds;
 			layoutData.area = layoutBounds;

+ 7 - 7
MBansheeEditor/ConsoleWindow.cs

@@ -14,7 +14,7 @@ namespace BansheeEditor
         #region Constants
         #region Constants
         public const string CLEAR_ON_PLAY_KEY = "EditorClearConsoleOnPlay";
         public const string CLEAR_ON_PLAY_KEY = "EditorClearConsoleOnPlay";
 
 
-        private const int TITLE_HEIGHT = 21;
+        private const int TITLE_HEIGHT = 25;
         private const int ENTRY_HEIGHT = 39;
         private const int ENTRY_HEIGHT = 39;
         private const int SEPARATOR_WIDTH = 3;
         private const int SEPARATOR_WIDTH = 3;
         private const float DETAILS_PANE_SIZE_PCT = 0.7f;
         private const float DETAILS_PANE_SIZE_PCT = 0.7f;
@@ -89,13 +89,13 @@ namespace BansheeEditor
                 EditorBuiltin.GetLogIcon(LogIcon.Error, 16, false),
                 EditorBuiltin.GetLogIcon(LogIcon.Error, 16, false),
                 EditorBuiltin.GetLogIcon(LogIcon.Error, 16, true));
                 EditorBuiltin.GetLogIcon(LogIcon.Error, 16, true));
 
 
-            GUIToggle infoBtn = new GUIToggle(new GUIContent(infoImages), EditorStyles.Button, GUIOption.FixedHeight(25));
-            GUIToggle warningBtn = new GUIToggle(new GUIContent(warningImages), EditorStyles.Button, GUIOption.FixedHeight(25));
-            GUIToggle errorBtn = new GUIToggle(new GUIContent(errorImages), EditorStyles.Button, GUIOption.FixedHeight(25));
+            GUIToggle infoBtn = new GUIToggle(new GUIContent(infoImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT));
+            GUIToggle warningBtn = new GUIToggle(new GUIContent(warningImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT));
+            GUIToggle errorBtn = new GUIToggle(new GUIContent(errorImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT));
 
 
-            GUIToggle detailsBtn = new GUIToggle(new LocEdString("Show details"), EditorStyles.Button, GUIOption.FixedHeight(25));
-            GUIButton clearBtn = new GUIButton(new LocEdString("Clear"), GUIOption.FixedHeight(25));
-            GUIToggle clearOnPlayBtn = new GUIToggle(new LocEdString("Clear on play"), EditorStyles.Button, GUIOption.FixedHeight(25));
+            GUIToggle detailsBtn = new GUIToggle(new LocEdString("Show details"), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT));
+            GUIButton clearBtn = new GUIButton(new LocEdString("Clear"), GUIOption.FixedHeight(TITLE_HEIGHT));
+            GUIToggle clearOnPlayBtn = new GUIToggle(new LocEdString("Clear on play"), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT));
 
 
             titleLayout.AddElement(infoBtn);
             titleLayout.AddElement(infoBtn);
             titleLayout.AddElement(warningBtn);
             titleLayout.AddElement(warningBtn);