Explorar el Código

Use given size as initial text input scroll container size

- If we've got a size from the caller we might as well use
  it as the scroll container size. It's more generally
  usefull than arbitrary values. Otherwize a multi-line
  text input would always need to have it's size adjusted
  even though it's size was given in the ctor.
Nur Monson hace 12 años
padre
commit
0fa4e0f629
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Modules/Contents/UI/Source/PolyUITextInput.cpp

+ 1 - 1
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -172,7 +172,7 @@ UITextInput::UITextInput(bool multiLine, Number width, Number height) : UIElemen
 	
 	
 	scrollContainer = NULL;
 	scrollContainer = NULL;
 	if(multiLine) {
 	if(multiLine) {
-		scrollContainer = new UIScrollContainer(linesContainer, false, true, 200, 200);
+		scrollContainer = new UIScrollContainer(linesContainer, false, true, width, height);
 		scrollContainer->addEventListener(this, Event::CHANGE_EVENT);
 		scrollContainer->addEventListener(this, Event::CHANGE_EVENT);
 		addChild(scrollContainer);
 		addChild(scrollContainer);
 	} else {
 	} else {