public static VisTextField createTextField(String style, boolean textCursor) { VisTextField visTextField = new VisTextField(); Skin skin = VisUI.getSkin(); visTextField.setStyle(skin.get(style, VisTextField.VisTextFieldStyle.class)); if (textCursor) visTextField.addListener(new CursorListener(CursorManager.TEXT)); return visTextField; }
private void setListeners() { physicsEnabledCheckBox.addListener(new CheckBoxChangeListener(getUpdateEventName())); gravityXTextField.addListener(new KeyboardListener(getUpdateEventName())); gravityYTextField.addListener(new KeyboardListener(getUpdateEventName())); sleepVelocityTextField.addListener(new KeyboardListener(getUpdateEventName())); enableLightsCheckBox.addListener(new CheckBoxChangeListener(getUpdateEventName())); diffuseCheckBox.addListener(new CheckBoxChangeListener(getUpdateEventName())); ambientColorComponent.addListener( new ClickListener() { public void touchUp(InputEvent event, float x, float y, int pointer, int button) { super.touchUp(event, x, y, pointer, button); facade.sendNotification(AMBIENT_COLOR_BUTTON_CLICKED); } }); }
public static VisTextField createTextField(String style) { VisTextField visTextField = new VisTextField("", style); visTextField.addListener(new CursorListener(CursorManager.TEXT)); return visTextField; }