Package com.drakulo.games.ais.ui.component.button

Examples of com.drakulo.games.ais.ui.component.button.Button.disable()


    // Load button
    y += vPadding;
    label = FontHelper.firstToUpper(I18n.get("global.load"));
    Button loadButton = new TextButton(label, x, y);
    loadButton.setSize(buttonWidth, buttonHeight);
    loadButton.disable();
    loadButton.hide();
    loadButton.setActionHandler(new ActionHandler() {

      @Override
      public void run() {
View Full Code Here


    y += vPadding;
    label = FontHelper.firstToUpper(I18n.get("global.save"));
    Button saveButton = new TextButton(label, x, y);
    saveButton.hide();
    saveButton.setSize(buttonWidth, buttonHeight);
    saveButton.disable();
    saveButton.setActionHandler(new ActionHandler() {

      @Override
      public void run() {
        // TODO
View Full Code Here

    // Settings button
    y += vPadding;
    label = FontHelper.firstToUpper(I18n.get("global.settings"));
    Button settingsButton = new TextButton(label, x, y);
    settingsButton.setSize(buttonWidth, buttonHeight);
    settingsButton.disable();
    settingsButton.hide();
    settingsButton.setActionHandler(new ActionHandler() {

      @Override
      public void run() {
View Full Code Here

    // Robots actions
    // Terrabot (terrain preparation)

    Button terrabotButton = new ImageButton("TERRABOT", x, y);
    terrabotButton.disable();
    // TODO why the terrabutton size is fucked?
    terrabotButton.setSize(ImageButton.IB_DEFAULT_SIZE,
        ImageButton.IB_DEFAULT_SIZE);
    terrabotButton.setActionHandler(new ActionHandler() {
View Full Code Here

      if (BuildingType.COMMAND_CENTER.equals(type)) {
        this.cmButton = button;
        this.cmButton.enable();
        if (GameData.getSelectedColony().isCommandCenterBuilt()) {
          // Only 1 command center
          button.disable();
        }
      } else if (BuildingType.RESEARCH_CENTER.equals(type)
          && GameData.getSelectedColony().isResearchCenterBuilt()) {
        // Only 1 research center
        button.disable();
View Full Code Here

          button.disable();
        }
      } else if (BuildingType.RESEARCH_CENTER.equals(type)
          && GameData.getSelectedColony().isResearchCenterBuilt()) {
        // Only 1 research center
        button.disable();
      }
      this.buttons.add(button);
      x += pitch;
    }
View Full Code Here

      if (BuildingType.COMMAND_CENTER.equals(type)) {
        cmButton = button;
        cmButton.enable();
        if (GameData.getSelectedColony().isCommandCenterBuilt()) {
          // Only 1 command center
          button.disable();
        }
      } else if (BuildingType.RESEARCH_CENTER.equals(type)
          && GameData.getSelectedColony().isResearchCenterBuilt()) {
        // Only 1 research center
        button.disable();
View Full Code Here

          button.disable();
        }
      } else if (BuildingType.RESEARCH_CENTER.equals(type)
          && GameData.getSelectedColony().isResearchCenterBuilt()) {
        // Only 1 research center
        button.disable();
      }
      buttons.add(button);
      x += pitch;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.