Пример #1
0
 /**
  * Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.
  */
 private void addSingleplayerMultiplayerButtons(int par1, int par2) {
   buttonList.add(
       new GuiButton(1, width / 2 - 100, par1, I18n.func_135053_a("menu.singleplayer")));
   buttonList.add(
       new GuiButton(2, width / 2 - 100, par1 + par2 * 1, I18n.func_135053_a("menu.multiplayer")));
   buttonList.add(
       field_130023_H =
           new GuiButton(14, width / 2 - 100, par1 + par2 * 2, I18n.func_135053_a("menu.online")));
   field_130023_H.drawButton = false;
 }
Пример #2
0
  /** Adds Demo buttons on Main Menu for players who are playing Demo. */
  private void addDemoButtons(int par1, int par2) {
    buttonList.add(new GuiButton(11, width / 2 - 100, par1, I18n.func_135053_a("menu.playdemo")));
    buttonList.add(
        buttonResetDemo =
            new GuiButton(
                12, width / 2 - 100, par1 + par2 * 1, I18n.func_135053_a("menu.resetdemo")));
    ISaveFormat isaveformat = mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

    if (worldinfo == null) {
      buttonResetDemo.enabled = false;
    }
  }