Пример #1
0
  @Override
  public void add(Node parent) {
    super.add(parent);
    String mappingName = TextField.this.id + "MOUSE";
    if (!inputManager.hasMapping(mappingName)) {
      inputManager.addMapping(mappingName, new MouseButtonTrigger(0));
    }

    inputManager.addListener(actionListener, TextField.this.id + "MOUSE");
  }
Пример #2
0
  @Override
  public void setVisible(boolean visible) {
    super.setVisible(visible);

    if (visible) {
      inputManager.addListener(actionListener, TextField.this.id + "MOUSE");
      bitmapText.setCullHint(Spatial.CullHint.Never);
    } else {
      inputManager.removeListener(actionListener);
      bitmapText.setCullHint(Spatial.CullHint.Always);
    }
  }
Пример #3
0
 @Override
 public void remove() {
   super.remove();
   inputManager.removeListener(actionListener);
 }