فهرست منبع

Fixed drop down box background frame graphic
Hovering over already open menu will no longer close it

Marko Pintera 12 سال پیش
والد
کامیت
5c332ffb37
4فایلهای تغییر یافته به همراه13 افزوده شده و 5 حذف شده
  1. 4 2
      BansheeEngine/Source/BsEngineGUI.cpp
  2. 1 1
      BansheeEngine/Source/BsGUIDropDownBox.cpp
  3. 7 1
      CamelotClient/Source/BsGUIMenuBar.cpp
  4. 1 1
      TODO.txt

+ 4 - 2
BansheeEngine/Source/BsEngineGUI.cpp

@@ -595,12 +595,14 @@ namespace BansheeEngine
 		dropDownBoxStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
 		dropDownBoxStyle.fixedHeight = false;
 		dropDownBoxStyle.fixedWidth = false;
-		dropDownBoxStyle.height = 14;
-		dropDownBoxStyle.width = 30;
 		dropDownBoxStyle.border.left = 1;
 		dropDownBoxStyle.border.right = 1;
 		dropDownBoxStyle.border.top = 1;
 		dropDownBoxStyle.border.bottom = 1;
+		dropDownBoxStyle.margins.left = 1;
+		dropDownBoxStyle.margins.right = 1;
+		dropDownBoxStyle.margins.top = 1;
+		dropDownBoxStyle.margins.bottom = 1;
 
 		mSkin.setStyle("ListBoxFrame", dropDownBoxStyle);
 		mSkin.setStyle("MenuBarFrame", dropDownBoxStyle);

+ 1 - 1
BansheeEngine/Source/BsGUIDropDownBox.cpp

@@ -207,7 +207,7 @@ namespace BansheeEngine
 		mBackgroundArea = GUIArea::create(*mOwner, x, y, width, height);
 		mBackgroundArea->setDepth(102);
 
-		mBackgroundFrame = GUITexture::create(*mOwner, GUIImageScaleMode::ScaleToFit, mOwner->mBackgroundStyle);
+		mBackgroundFrame = GUITexture::create(*mOwner, GUIImageScaleMode::StretchToFit, mOwner->mBackgroundStyle);
 		mBackgroundArea->getLayout().addElement(mBackgroundFrame);
 
 		updateGUIElements();

+ 7 - 1
CamelotClient/Source/BsGUIMenuBar.cpp

@@ -284,7 +284,13 @@ namespace BansheeEditor
 	{
 		if(mSubMenuOpen)
 		{
-			openSubMenu(name);
+			const GUIMenuBarData* subMenu = getSubMenu(name);
+
+			if(subMenu == nullptr)
+				return;
+
+			if(mSubMenuButton != subMenu->button)
+				openSubMenu(name);
 		}
 	}
 

+ 1 - 1
TODO.txt

@@ -175,7 +175,7 @@ Low priority TODO
    - Material::setParamBlock is commented out
  - Add support for diacritical marks to the input system (in WindowEventUtilities)
  - onMovedOrResized is still used by Viewport while that same callback is offered by RenderWindowManager. There is no need to have them in both places.
- - Replace list of windows in WIndowEventUtilities with RenderWindowManager list. No need to keep two lists I think
+ - Texture "ScaleToFit" will cause the texture to repeat instead of clipping the image. e.g. a 50x20 texture placed on an 50x100 area will repeat 5x
 ----------------------------------------------------------------------------------------------
 Optional:
  - Need better handling for shader techniques. Some Materials are able to run on all renderers yet I can only specify one. This is problematic