Пример #1
0
 private void invalidateListPanes() {
   if (militaryBottomPane != null) {
     militaryBottomPane.clear();
   }
   if (militaryTopPane != null) {
     militaryTopPane.clear();
   }
   showingTextWidgets.forEach(TextWidget::dispose);
   showingTextWidgets.clear();
   militaryBottomPane = null;
   militaryTopPane = null;
   currentMilitary = null;
   currentMilitaryPos = null;
 }
Пример #2
0
 private void updateScrollPane() {
   innerContainer.clear();
   switch (screen) {
     case SCREEN_LICENSE:
       innerContainer.add(getLicenseWidget()).row();
       break;
     case SCREEN_CREDITS:
       innerContainer.add(getCreditsWidget()).row();
       break;
   }
 }
Пример #3
0
  void changeTest(int behaviorIndex) {
    // Remove the old behavior and its window
    testsTable.clear();
    if (currentTest != null) {
      if (currentTest.getDetailWindow() != null) currentTest.getDetailWindow().remove();
      currentTest.dispose();
    }

    // Add the new behavior and its window
    currentTest = tests[behaviorIndex];
    Gdx.app.log("BehaviorTreeTests", "***********************************************");
    Gdx.app.log("BehaviorTreeTests", "Starting test " + currentTest.getClass().getSimpleName());
    Gdx.app.log("BehaviorTreeTests", "***********************************************");
    String description = currentTest.getDescription();
    if (description != null) {
      Gdx.app.log("BehaviorTreeTests", description);
      Gdx.app.log("BehaviorTreeTests", "***********************************************");
    }
    currentTest.create(testsTable);
    InputMultiplexer im = (InputMultiplexer) Gdx.input.getInputProcessor();
    if (im.size() > 1) im.removeProcessor(1);
    if (currentTest.getInputProcessor() != null) im.addProcessor(currentTest.getInputProcessor());
    if (currentTest.getDetailWindow() != null) stage.addActor(currentTest.getDetailWindow());
  }
Пример #4
0
 private void rebuild() {
   menuItems.clear();
   for (Menu menu : menus) menuItems.add(menu.getOpenButton());
 }
 protected void clearProps() {
   table.clear();
 }