UIInputText
Campo de texto editavel com caret, selecao e input do teclado.
Criar no Editor
- Garanta que existe um
UIControllerna cena. - Crie um GameObject e adicione
UIRect. - Adicione o componente
UIInputText.
Como Usar
- Pegue o componente com
myObject.findComponent(UIInputText.class). - Leia e altere as propriedades do componente para controlar o comportamento.
- Teste o input ou layout no modo Play.
Exemplo em Java
SpatialObject myObject = /* your object */;
UIInputText comp = myObject.findComponent(UIInputText.class);
if (comp != null) {
// set the color value:
comp.color = new Color(255, 255, 255, 255);
// read the color value:
Color colorValue = comp.color;
// set the text value:
comp.text = "value";
// read the text value:
String textValue = comp.text;
// set the textSize value:
comp.textSize = 1f;
// read the textSize value:
float textSizeValue = comp.textSize;
}