Ver código fonte

Improving look of morph shape display in the animation inspector

BearishSun 9 anos atrás
pai
commit
58df159860

BIN
Data/Raw/Editor/Skin/ExpandArrowHoverOff.png


BIN
Data/Raw/Editor/Skin/ExpandArrowHoverOn.png


BIN
Data/Raw/Editor/Skin/ExpandArrowNormalOff.png


BIN
Data/Raw/Editor/Skin/ExpandArrowNormalOn.png


+ 13 - 1
Source/BansheeEditor/Source/BsBuiltinEditorResources.cpp

@@ -1347,7 +1347,19 @@ namespace BansheeEngine
 		expandButtonStyle.fixedHeight = true;
 		expandButtonStyle.fixedWidth = true;
 		expandButtonStyle.height = 10;
-		expandButtonStyle.width = 10;
+		expandButtonStyle.width = 11;
+		expandButtonStyle.normal.textColor = TextNormalColor;
+		expandButtonStyle.hover.textColor = TextNormalColor;
+		expandButtonStyle.active.textColor = TextNormalColor;
+		expandButtonStyle.normalOn.textColor = TextNormalColor;
+		expandButtonStyle.hoverOn.textColor = TextNormalColor;
+		expandButtonStyle.activeOn.textColor = TextNormalColor;
+		expandButtonStyle.font = defaultFont;
+		expandButtonStyle.fontSize = DefaultFontSize;
+		expandButtonStyle.textHorzAlign = THA_Left;
+		expandButtonStyle.textVertAlign = TVA_Center;
+		expandButtonStyle.contentOffset = RectOffset(16, 0, 0, 0);
+		expandButtonStyle.border.left = 10;
 
 		skin->setStyle("Expand", expandButtonStyle);
 

+ 1 - 1
Source/BansheeEngine/Source/BsGUIHelper.cpp

@@ -43,7 +43,7 @@ namespace BansheeEngine
 		UINT32 contentWidth = style.margins.left + style.margins.right + style.contentOffset.left + style.contentOffset.right;
 		UINT32 contentHeight = style.margins.top + style.margins.bottom + style.contentOffset.top + style.contentOffset.bottom;
 
-		if(style.font != nullptr)
+		if(style.font != nullptr && !text.empty())
 		{
 			bs_frame_mark();
 

+ 7 - 2
Source/MBansheeEditor/Inspectors/AnimationInspector.cs

@@ -147,10 +147,11 @@ namespace BansheeEditor
                     GUILayoutY channelLayout = channelsLayout.AddLayoutY();
 
                     GUILayoutX channelTitleLayout = channelLayout.AddLayoutX();
-                    GUILayoutX channelContentLayout = channelLayout.AddLayoutX();
+                    channelLayout.AddSpace(5);
+                    GUILayoutY channelContentLayout = channelLayout.AddLayoutY();
 
                     string channelName = channels[i].Name;
-                    GUIToggle channelNameField = new GUIToggle(channelName, EditorStyles.Foldout);
+                    GUIToggle channelNameField = new GUIToggle(channelName, EditorStyles.Expand, GUIOption.FlexibleWidth());
 
                     channelTitleLayout.AddSpace(15); // Indent
                     channelTitleLayout.AddElement(channelNameField);
@@ -169,7 +170,11 @@ namespace BansheeEditor
                     for (int j = 0; j < shapes.Length; j++)
                     {
                         GUILayoutX shapeLayout = channelContentLayout.AddLayoutX();
+                        channelContentLayout.AddSpace(5);
 
+                        LocString nameString = new LocString("[{0}]. {1}");
+                        nameString.SetParameter(0, j.ToString());
+                        nameString.SetParameter(1, shapes[j].Name);
                         GUILabel shapeNameField = new GUILabel(shapes[j].Name);
 
                         LocString weightString = new LocEdString("Weight: {0}");