Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
  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);
          }
        });
  }
Ejemplo n.º 3
0
 public static VisTextField createTextField(String style) {
   VisTextField visTextField = new VisTextField("", style);
   visTextField.addListener(new CursorListener(CursorManager.TEXT));
   return visTextField;
 }