コード例 #1
0
 private void creatingTheTextFields() {
   userField = new TextField(Constant.USER_NAME, skin);
   userField.setColor(1, 0, 0, 0.5f);
   passwordField = new TextField(Constant.PASSWORD, skin);
   passwordField.setColor(1, 0, 0, 0.5f);
   passwordCheckField = new TextField(RE_PASSWORD, skin);
   passwordCheckField.setColor(1, 0, 0, 0.5f);
   emailField = new TextField(EMAIL, skin);
   emailField.setColor(1, 0, 0, 0.5f);
 }
コード例 #2
0
  public void updateProperties() {
    if (editActors == null) return;

    updateProperties = true;

    Actor model = editActors.get(0);
    getStage().setKeyboardFocus(null);
    name.setText(model.getName());
    visible.setChecked(model.isVisible());
    positionX.setText(String.format(Locale.ENGLISH, "%.2f", model.getX()));
    positionY.setText(String.format(Locale.ENGLISH, "%.2f", model.getY()));
    rotation.setText(String.format(Locale.ENGLISH, "%.2f", model.getRotation()));
    lockRatio.setChecked(Math.abs(model.getScaleX() - model.getScaleY()) < 0.01f);
    scaleX.setText(String.format(Locale.ENGLISH, "%.2f", model.getScaleX()));
    scaleY.setText(String.format(Locale.ENGLISH, "%.2f", model.getScaleY()));
    Color color = model.getColor();
    r.setText(String.format(Locale.ENGLISH, "%.0f", color.r * 255));
    g.setText(String.format(Locale.ENGLISH, "%.0f", color.g * 255));
    b.setText(String.format(Locale.ENGLISH, "%.0f", color.b * 255));
    a.setText(String.format(Locale.ENGLISH, "%.0f", color.a * 255));

    scaleY.setDisabled(lockRatio.isChecked());
    scaleY.setColor(lockRatio.isChecked() ? disableColor : enableColor);

    updateProperties = false;
  }