Browse Source

Fixed up input box selection textures

Marko Pintera 12 years ago
parent
commit
885cd48d96
2 changed files with 10 additions and 15 deletions
  1. 10 14
      BansheeEngine/Source/BsGUIInputBox.cpp
  2. 0 1
      TODO.txt

+ 10 - 14
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -326,8 +326,11 @@ namespace BansheeEngine
 	{
 		if(ev.getType() == GUIMouseEventType::MouseOver)
 		{
-			mImageDesc.texture = mStyle->hover.texture;
-			markContentAsDirty();
+			if(!mHasFocus)
+			{
+				mImageDesc.texture = mStyle->hover.texture;
+				markContentAsDirty();
+			}
 
 			if(!mInputCursorSet)
 			{
@@ -339,8 +342,11 @@ namespace BansheeEngine
 		}
 		else if(ev.getType() == GUIMouseEventType::MouseOut)
 		{
-			mImageDesc.texture = mStyle->normal.texture;
-			markContentAsDirty();
+			if(!mHasFocus)
+			{
+				mImageDesc.texture = mStyle->normal.texture;
+				markContentAsDirty();
+			}
 
 			if(!mDragInProgress && mInputCursorSet)
 			{
@@ -352,8 +358,6 @@ namespace BansheeEngine
 		}
 		else if(ev.getType() == GUIMouseEventType::MouseDown)
 		{
-			mImageDesc.texture = mStyle->active.texture;
-
 			if(mHasFocus)
 			{
 				if(ev.isShiftDown())
@@ -389,14 +393,6 @@ namespace BansheeEngine
 
 			return true;
 		}
-		else if(ev.getType() == GUIMouseEventType::MouseUp)
-		{
-			mImageDesc.texture = mStyle->hover.texture;
-
-			markContentAsDirty();
-
-			return true;
-		}
 		else if(ev.getType() == GUIMouseEventType::MouseDragStart)
 		{
 			if(!ev.isShiftDown())

+ 0 - 1
TODO.txt

@@ -33,7 +33,6 @@ IMMEDIATE:
     - Make sure GUI system uses a dummy texture if one isn't available
 	- SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
 
-- Writing text in the large text boxes centers the text after I resize the window a bit.
 - Scrolling the window shouldn't remove text selection
 - Hover colors of the scroll bar are wrong
 - Ability to scroll by just mousing over and moving the scroll wheel