瀏覽代碼

Clicking on the input box now moves the caret properly the first time

Marko Pintera 12 年之前
父節點
當前提交
3486c33faf
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 4 0
      BansheeEngine/Source/BsGUIInputBox.cpp
  2. 4 2
      TODO.txt

+ 4 - 0
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -623,6 +623,10 @@ namespace BansheeEngine
 	void GUIInputBox::showCaret()
 	void GUIInputBox::showCaret()
 	{
 	{
 		mCaretShown = true;
 		mCaretShown = true;
+
+		TEXT_SPRITE_DESC textDesc = getTextDesc();
+		Int2 offset = getTextOffset();
+		gGUIManager().getInputCaretTool()->updateText(textDesc, offset, mTextOffset);
 		markContentAsDirty();
 		markContentAsDirty();
 	}
 	}
 
 

+ 4 - 2
TODO.txt

@@ -33,8 +33,10 @@ IMMEDIATE:
     - Make sure GUI system uses a dummy texture if one isn't available
     - 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
 	- SpriteTexture keeps a static reference to DUmmyTexture which I need to release before shutdown
 
 
-- InputBox text clip rect is probably wrong as it doesn't account parent element clip rect
- (possibly selection and caret clip rects too)
+- Shift+click should select text
+- 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
+- Clicking an input box when its not focused doesn't move the cursor properly (it stays at the start)
 - Hover colors of the scroll bar are wrong
 - Hover colors of the scroll bar are wrong
 - Ability to scroll by just mousing over and moving the scroll wheel
 - Ability to scroll by just mousing over and moving the scroll wheel