com.badlogic.gdx.scenes.scene2d.ui.Window.remove()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Window.remove()方法的一些代码示例,展示了Window.remove()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.remove()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Window
类名称:Window
方法名:remove

Window.remove介绍

暂无

代码示例

代码示例来源:origin: langurmonkey/gaiasky

@Override
public boolean handle(Event event) {
  if (event instanceof ChangeEvent) {
    me.remove();
    return true;
  }
  return false;
}

代码示例来源:origin: langurmonkey/gaiasky

@Override
public boolean handle(Event event) {
  if (event instanceof ChangeEvent) {
    me.remove();
    return true;
  }
  return false;
}

代码示例来源:origin: stackoverflow.com

public class MyStage extends Stage {
  private boolean debug = false;
  private Window debugWindow = new DebugWindow(); // your customized Window that contains the debug info 
  public MyStage(...) {
    addListener(new ClickListener() {
      @Override
      public void clicked(InputEvent event, float x, float y) {
        if (getTapCount() >= 2) { // i.e., double click
          debug = !debug;
        }
      }
    });
  }

  public void act() {
    // ...
    if (debug && debugWindow.getStage() != this) {
      addActor(debugWindow); // This will add the debug window to your stage, making the debug info visible
    }
    else if (!debug && debugWindow.getStage() == this) {
      debugWindow.remove(); // When you want the debug window out of the way
    }
  }
}

代码示例来源:origin: langurmonkey/gaiasky

@Override
public boolean handle(Event event) {
  if (event instanceof ChangeEvent) {
    boolean cool = checkField(day, 1, 31);
    cool = checkField(year, -20000, 20000) && cool;
    cool = checkField(hour, 0, 23) && cool;
    cool = checkField(min, 0, 59) && cool;
    cool = checkField(sec, 0, 59) && cool;
    if (cool) {
      // Set the date
      LocalDateTime date = LocalDateTime.of(Integer.parseInt(year.getText()), month.getSelectedIndex() + 1, Integer.parseInt(day.getText()), Integer.parseInt(hour.getText()), Integer.parseInt(min.getText()), Integer.parseInt(sec.getText()));
      // Send time change command
      EventManager.instance.post(Events.TIME_CHANGE_CMD, date.toInstant(ZoneOffset.UTC));
      me.remove();
    }
    return true;
  }
  return false;
}

代码示例来源:origin: langurmonkey/gaiasky

if (ie.getType() == Type.keyUp) {
  if (ie.getKeyCode() == Keys.ESCAPE || ie.getKeyCode() == Keys.ENTER) {
    me.remove();
    return true;
  } else if (!searchInput.getText().equals(currentInputText)) {

相关文章