Package com.googlecode.jumpnevolve.graphics.gui.objects

Examples of com.googlecode.jumpnevolve.graphics.gui.objects.InterfaceTextButton


  private void createMenuButton() {
    if (!this.menuButtonCreated) {
      InterfaceContainer mainCon = this.gui.getMainContainer();
      if (mainCon instanceof GridContainer) {
        ((GridContainer) mainCon).add(new InterfaceTextButton(
            InterfaceFunctions.LEVEL_EXIT, "Hauptmenü"), 0, 1,
            GridContainer.MODUS_DEFAULT, GridContainer.MODUS_Y_UP);
      } else if (mainCon instanceof BorderContainer) {
        ((BorderContainer) mainCon).add(new InterfaceTextButton(
            InterfaceFunctions.LEVEL_EXIT, "Hauptmenü"),
            BorderContainer.POSITION_HIGH);
      }
      this.menuButtonCreated = true;
    }
View Full Code Here


      }
    }

    // Button-Liste erstellen
    for (String file : this.levels) {
      InterfaceTextButton button = new InterfaceTextButton(
          InterfaceFunctions.LEVELSELECTION, file);
      button.addInformable(this);
      this.selectList.addTextButton(button);
    }
    GridContainer grid = new GridContainer(1, 1);
    grid.add(this.selectList, 0, 0);
    grid.maximizeSize();
View Full Code Here

  public SubMenu(Menu parent, InterfaceContainer mainCon, String name) {
    super(new GridContainer(1, 1, GridContainer.MODUS_X_RIGHT,
        GridContainer.MODUS_Y_UP), mainCon);
    this.parent = parent;
    this.name = name;
    InterfaceTextButton b = new InterfaceTextButton(
        InterfaceFunctions.MENU_BACKTOMAINMENU, "Hauptmenü");
    b.addInformable(this);
    ((GridContainer) this.getHeadlineContainer()).add(b, 0, 0);
    mainCon.maximizeSize();
    this.getHeadlineContainer().maximizeXRange();
  }
View Full Code Here

    super(parent, new GridContainer(1, 1), name);
    ((GridContainer) this.getMainContainer()).add(this.buttonList, 0, 0);
  }

  public void addEntry(String name, InterfaceFunction function) {
    this.buttonList.addTextButton(new InterfaceTextButton(function, name));
  }
View Full Code Here

    // Kopfzeile mit Buttons erstellen
    GridContainer topGrid = new GridContainer(1, 5,
        GridContainer.MODUS_DEFAULT, GridContainer.MODUS_Y_UP);
    topGrid.maximizeXRange();
    topGrid.add(new InterfaceTextButton(InterfaceFunctions.EDITOR_EXIT,
        "Exit"), 0, 0);
    topGrid.add(new InterfaceTextButton(InterfaceFunctions.EDITOR_SETTINGS,
        "Settings"), 0, 1);
    topGrid.add(new InterfaceTextButton(InterfaceFunctions.EDITOR_PLAYER,
        "Player"), 0, 2);
    topGrid.add(new InterfaceTextButton(InterfaceFunctions.EDITOR_CURRENT,
        "Current"), 0, 3);
    topGrid.add(new InterfaceTextButton(InterfaceFunctions.EDITOR_DATA,
        "Data"), 0, 4);
    topGrid.enableBackground();

    // Löschen-Button erstellen
    InterfaceButton deleteButton = new InterfaceButton(
View Full Code Here

   *
   */
  public Dialog() {
    this.enableBackground();
    this.setBackgroundColor(Color.darkGray);
    InterfaceTextButton closeButton = new InterfaceTextButton(
        InterfaceFunctions.DIALOG_CLOSE, "Dialog schließen");
    closeButton.addInformable(this);
    this.buttons.add(closeButton);
    this.updateCon();
    Dialog.Instances.add(this);
  }
View Full Code Here

    this.addPart(new DialogPart(new InterfaceTextField(
        InterfaceFunctions.INTERFACE_TEXTFIELD), name));
  }

  public void addTextButton(InterfaceFunction function, String text) {
    this.buttons.add(this.buttons.size() - 1, new InterfaceTextButton(
        function, text));
    this.updateCon();
  }
View Full Code Here

   */
  public TextButtonList(int numberOfButtonsDisplayed,
      int distanceBetweenButtons) {
    this.numberOfButtonsDisplayed = numberOfButtonsDisplayed;
    this.distanceBetweenButtons = distanceBetweenButtons;
    InterfaceTextButton up = new InterfaceTextButton(
        InterfaceFunctions.INTERFACE_TEXTBUTTONLIST_UP, "Nach oben"), down = new InterfaceTextButton(
        InterfaceFunctions.INTERFACE_TEXTBUTTONLIST_DOWN, "Nach unten");
    this.list.put(UP_POS, up);
    this.invertList.put(up, UP_POS);
    this.add(up, Vector.ZERO);
    this.list.put(DOWN_POS, down);
    this.invertList.put(down, DOWN_POS);
    this.add(down, Vector.ZERO);
    up.addInformable(this);
    down.addInformable(this);
    // TODO: Up- und Down-Button sollten für maxWidth betrachtet werden,
    // dies kann jedoch nicht hier geschehen, da sonst deren Größe aufgrund
    // der fehlenden Font noch nicht initialisiert ist
  }
View Full Code Here

TOP

Related Classes of com.googlecode.jumpnevolve.graphics.gui.objects.InterfaceTextButton

Copyright © 2018 www.massapicom. 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.