/** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   StringTranslate var4 = StringTranslate.getInstance();
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.title"),
       this.width / 2,
       17,
       16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.start"),
       this.width / 2 - 100,
       53,
       10526880);
   this.drawString(this.fontRenderer, this.field_98069_o, this.width / 2 - 100, 66, 16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("mco.configure.world.subscription.daysleft"),
       this.width / 2 - 100,
       85,
       10526880);
   this.drawString(
       this.fontRenderer, String.valueOf(this.field_98068_n), this.width / 2 - 100, 98, 16777215);
   super.drawScreen(par1, par2, par3);
 }
  public void initGui() {
    StringTranslate stringtranslate = StringTranslate.getInstance();
    field_22107_a = stringtranslate.translateKey("options.videoTitle");
    int i = 0;
    EnumOptions aenumoptions[] = field_22108_k;
    int j = aenumoptions.length;
    for (int k = 0; k < j; k++) {
      EnumOptions enumoptions = aenumoptions[k];
      if (!enumoptions.getEnumFloat()) {
        controlList.add(
            new GuiSmallButton(
                enumoptions.returnEnumOrdinal(),
                (width / 2 - 155) + (i % 2) * 160,
                height / 6 + 24 * (i >> 1),
                enumoptions,
                guiGameSettings.getKeyBinding(enumoptions)));
      } else {
        controlList.add(
            new GuiSlider(
                enumoptions.returnEnumOrdinal(),
                (width / 2 - 155) + (i % 2) * 160,
                height / 6 + 24 * (i >> 1),
                enumoptions,
                guiGameSettings.getKeyBinding(enumoptions),
                guiGameSettings.getOptionFloatValue(enumoptions)));
      }
      i++;
    }

    controlList.add(
        new GuiButton(
            200, width / 2 - 100, height / 6 + 168, stringtranslate.translateKey("gui.done")));
  }
Ejemplo n.º 3
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   StringTranslate stringtranslate = StringTranslate.getInstance();
   screenTitle = stringtranslate.translateKey("selectWorld.title");
   localizedWorldText = stringtranslate.translateKey("selectWorld.world");
   localizedMustConvertText = stringtranslate.translateKey("selectWorld.conversion");
   localizedGameModeText[0] = stringtranslate.translateKey("gameMode.survival");
   localizedGameModeText[1] = stringtranslate.translateKey("gameMode.creative");
   loadSaves();
   worldSlotContainer = new GuiWorldSlot(this);
   worldSlotContainer.registerScrollButtons(controlList, 4, 5);
   initButtons();
 }
 /**
  * Adds Singleplayer and Multiplayer buttons on Main Menu for players who have bought the game.
  */
 private void addSingleplayerMultiplayerButtons(
     int par1, int par2, StringTranslate par3StringTranslate) {
   this.buttonList.add(
       new GuiButton(
           1, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.singleplayer")));
   this.buttonList.add(
       new GuiButton(
           2,
           this.width / 2 - 100,
           par1 + par2 * 1,
           par3StringTranslate.translateKey("menu.multiplayer")));
 }
Ejemplo n.º 5
0
  public GuiConnectFailed(String var1, String var2, Object... var3) {
    StringTranslate var4 = StringTranslate.getInstance();
    this.errorMessage = var4.translateKey(var1);
    if (var3 != null) {
      this.errorDetail = var4.translateKeyFormat(var2, var3);
    } else {
      this.errorDetail = var4.translateKey(var2);
    }

    // Spout Start
    ReconnectManager.detectKick(var1, var2, var3);
    // Spout End
  }
Ejemplo n.º 6
0
 public void initGui() {
   synchronized (serverInfo) {
     this.serverInfo.status = "Done";
   }
   StringTranslate var1 = StringTranslate.getInstance();
   this.screenTitle = var1.translateKey("Select server");
   this.field_22098_o = var1.translateKey("Unknown");
   this.field_22097_p = var1.translateKey("aaa");
   this.loadSaves();
   this.worldSlotContainer = new GuiServerSlot(this);
   this.worldSlotContainer.registerScrollButtons(this.controlList, 4, 5);
   this.initButtons();
 }
Ejemplo n.º 7
0
 public void initGui() {
   StringTranslate stringtranslate = StringTranslate.getInstance();
   controlList.add(
       new GuiSmallButton(
           5,
           width / 2 - 154,
           height - 48,
           stringtranslate.translateKey("texturePack.openFolder")));
   controlList.add(
       new GuiSmallButton(
           6, width / 2 + 4, height - 48, stringtranslate.translateKey("gui.done")));
   mc.texturePackList.updateAvaliableTexturePacks();
   fileLocation = (new File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath();
   guiTexturePackSlot = new GuiTexturePackSlot(this);
   guiTexturePackSlot.registerScrollButtons(controlList, 7, 8);
 }
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   this.func_98063_a(this.field_98065_b.field_96408_a);
   StringTranslate var1 = StringTranslate.getInstance();
   Keyboard.enableRepeatEvents(true);
   this.buttonList.add(
       new GuiButton(
           0, this.width / 2 - 100, this.height / 4 + 120 + 12, var1.translateKey("gui.cancel")));
 }
Ejemplo n.º 9
0
 public void drawScreen(int i, int j, float f) {
   guiTexturePackSlot.drawScreen(i, j, f);
   if (field_6454_o <= 0) {
     mc.texturePackList.updateAvaliableTexturePacks();
     field_6454_o += 20;
   }
   StringTranslate stringtranslate = StringTranslate.getInstance();
   drawCenteredString(
       fontRenderer, stringtranslate.translateKey("texturePack.title"), width / 2, 16, 0xffffff);
   drawCenteredString(
       fontRenderer,
       stringtranslate.translateKey("texturePack.folderInfo"),
       width / 2 - 77,
       height - 26,
       0x808080);
   super.drawScreen(i, j, f);
 }
Ejemplo n.º 10
0
  /**
   * Returns the translation of the given index in the given String array. If the index is smaller
   * than 0 or greater than/equal to the length of the String array, it is changed to 0.
   */
  private static String getTranslation(String[] par0ArrayOfStr, int par1) {
    if (par1 < 0 || par1 >= par0ArrayOfStr.length) {
      par1 = 0;
    }

    StringTranslate var2 = StringTranslate.getInstance();
    return var2.translateKey(par0ArrayOfStr[par1]);
  }
Ejemplo n.º 11
0
 private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3) {
   this.buttonList.add(
       new GuiButton(
           3,
           this.width / 2 - 100,
           par2 + par3 * 2,
           par1StringTranslate.translateKey("menu.online")));
 }
  private static String func_48571_a(String par0ArrayOfStr[], int par1) {
    if (par1 < 0 || par1 >= par0ArrayOfStr.length) {
      par1 = 0;
    }

    StringTranslate stringtranslate = StringTranslate.getInstance();
    return stringtranslate.translateKey(par0ArrayOfStr[par1]);
  }
Ejemplo n.º 13
0
  /** Adds Demo buttons on Main Menu for players who are playing Demo. */
  private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate) {
    this.buttonList.add(
        new GuiButton(
            11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo")));
    this.buttonList.add(
        this.buttonResetDemo =
            new GuiButton(
                12,
                this.width / 2 - 100,
                par1 + par2 * 1,
                par3StringTranslate.translateKey("menu.resetdemo")));
    ISaveFormat var4 = this.mc.getSaveLoader();
    WorldInfo var5 = var4.getWorldInfo("Demo_World");

    if (var5 == null) {
      this.buttonResetDemo.enabled = false;
    }
  }
  private void func_73972_b(int par1, int par2, StringTranslate par3StringTranslate) {
    this.controlList.add(
        new GuiButton(
            11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo")));
    this.controlList.add(
        this.field_73973_d =
            new GuiButton(
                12,
                this.width / 2 - 100,
                par1 + par2 * 1,
                par3StringTranslate.translateKey("menu.resetdemo")));
    ISaveFormat var4 = this.mc.getSaveLoader();
    WorldInfo var5 = var4.getWorldInfo("Demo_World");

    if (var5 == null) {
      this.field_73973_d.enabled = false;
    }
  }
Ejemplo n.º 15
0
 /** Draws the screen and all the components in it. */
 public void drawScreen(int par1, int par2, float par3) {
   StringTranslate var4 = StringTranslate.getInstance();
   this.drawDefaultBackground();
   this.drawCenteredString(
       this.fontRenderer,
       var4.translateKey("selectServer.direct"),
       this.width / 2,
       this.height / 4 - 60 + 20,
       16777215);
   this.drawString(
       this.fontRenderer,
       var4.translateKey("addServer.enterIp"),
       this.width / 2 - 100,
       100,
       10526880);
   this.serverTextField.drawTextBox();
   super.drawScreen(par1, par2, par3);
 }
Ejemplo n.º 16
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   StringTranslate var1 = StringTranslate.getInstance();
   this.buttonList.add(
       new GuiFancyButton(
           5,
           this.width / 2 - 74,
           this.height - 48,
           var1.translateKey("texturePack.openFolder"),
           3));
   this.buttonList.add(
       new GuiFancyButton(
           6, this.width / 2 + 74, this.height - 48, var1.translateKey("gui.done"), 3));
   this.mc.texturePackList.updateAvaliableTexturePacks();
   this.fileLocation = (new File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath();
   this.guiTexturePackSlot = new GuiFancyTexturePackSlot(this);
   this.guiTexturePackSlot.registerScrollButtons(this.buttonList, 7, 8);
   bg = new GuiFancyRotatingBackground(mc, width, height, zLevel);
 }
Ejemplo n.º 17
0
 /** intilize the buttons for this GUI */
 public void initButtons() {
   StringTranslate stringtranslate = StringTranslate.getInstance();
   controlList.add(
       buttonSelect =
           new GuiButton(
               1,
               width / 2 - 154,
               height - 52,
               150,
               20,
               stringtranslate.translateKey("selectWorld.select")));
   controlList.add(
       buttonDelete =
           new GuiButton(
               6,
               width / 2 - 154,
               height - 28,
               70,
               20,
               stringtranslate.translateKey("selectWorld.rename")));
   controlList.add(
       buttonRename =
           new GuiButton(
               2,
               width / 2 - 74,
               height - 28,
               70,
               20,
               stringtranslate.translateKey("selectWorld.delete")));
   controlList.add(
       new GuiButton(
           3,
           width / 2 + 4,
           height - 52,
           150,
           20,
           stringtranslate.translateKey("selectWorld.create")));
   controlList.add(
       new GuiButton(
           0, width / 2 + 4, height - 28, 150, 20, stringtranslate.translateKey("gui.cancel")));
   buttonSelect.enabled = false;
   buttonRename.enabled = false;
   buttonDelete.enabled = false;
 }
Ejemplo n.º 18
0
 public void initGui() {
   StringTranslate var1 = StringTranslate.getInstance();
   this.controlList.clear();
   this.controlList.add(
       new GuiButton(
           0,
           this.width / 2 - 100,
           this.height / 4 + 120 + 12,
           var1.translateKey("Back to server list"))); // Spout
 }
Ejemplo n.º 19
0
  public void initGui() {
    StringTranslate stringtranslate = StringTranslate.getInstance();
    int i = func_20080_j();
    for (int j = 0; j < options.keyBindings.length; j++) {
      controlList.add(
          new GuiSmallButton(
              j,
              i + (j % 2) * 160,
              height / 6 + 24 * (j >> 1),
              70,
              20,
              options.getOptionDisplayString(j)));
    }

    controlList.add(
        new GuiButton(
            200, width / 2 - 100, height / 6 + 168, stringtranslate.translateKey("gui.done")));
    screenTitle = stringtranslate.translateKey("controls.title");
  }
  /** Creates the buttons that appear at the top of the Stats GUI. */
  public void addHeaderButtons() {
    StringTranslate stringtranslate = StringTranslate.getInstance();
    controlList.add(
        new GuiButton(
            0, width / 2 + 4, height - 28, 150, 20, stringtranslate.translateKey("gui.done")));
    controlList.add(
        new GuiButton(
            1,
            width / 2 - 154,
            height - 52,
            100,
            20,
            stringtranslate.translateKey("stat.generalButton")));
    GuiButton guibutton;
    controlList.add(
        guibutton =
            new GuiButton(
                2,
                width / 2 - 46,
                height - 52,
                100,
                20,
                stringtranslate.translateKey("stat.blocksButton")));
    GuiButton guibutton1;
    controlList.add(
        guibutton1 =
            new GuiButton(
                3,
                width / 2 + 62,
                height - 52,
                100,
                20,
                stringtranslate.translateKey("stat.itemsButton")));

    if (slotBlock.getSize() == 0) {
      guibutton.enabled = false;
    }

    if (slotItem.getSize() == 0) {
      guibutton1.enabled = false;
    }
  }
Ejemplo n.º 21
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    bg.RenderBackground(par1, par2, par3);
    this.guiTexturePackSlot.drawScreen(par1, par2, par3);

    if (this.refreshTimer <= 0) {
      this.mc.texturePackList.updateAvaliableTexturePacks();
      this.refreshTimer += 20;
    }

    StringTranslate var4 = StringTranslate.getInstance();
    this.drawCenteredString(
        this.fontRenderer, var4.translateKey("texturePack.title"), this.width / 2, 16, 16777215);
    this.drawCenteredString(
        this.fontRenderer,
        var4.translateKey("texturePack.folderInfo"),
        this.width / 2 - 77,
        this.height - 26,
        8421504);
    super.drawScreen(par1, par2, par3);
  }
Ejemplo n.º 22
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   StringTranslate var1 = StringTranslate.getInstance();
   Keyboard.enableRepeatEvents(true);
   this.controlList.clear();
   this.controlList.add(
       new GuiButton(
           0,
           this.width / 2 - 100,
           this.height / 4 + 96 + 12,
           var1.translateKey("selectServer.select")));
   this.controlList.add(
       new GuiButton(
           1, this.width / 2 - 100, this.height / 4 + 120 + 12, var1.translateKey("gui.cancel")));
   this.serverTextField = new GuiTextField(this.fontRenderer, this.width / 2 - 100, 116, 200, 20);
   this.serverTextField.setMaxStringLength(128);
   this.serverTextField.setFocused(true);
   this.serverTextField.setText(lastServerName);
   ((GuiButton) this.controlList.get(0)).enabled =
       this.serverTextField.getText().length() > 0
           && this.serverTextField.getText().split(":").length > 0;
 }
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    this.viewportTexture =
        this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
    Calendar var1 = Calendar.getInstance();
    var1.setTime(new Date());

    if (var1.get(2) + 1 == 11 && var1.get(5) == 9) {
      this.splashText = "Happy birthday, ez!";
    } else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) {
      this.splashText = "Happy birthday, Notch!";
    } else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) {
      this.splashText = "Merry X-mas!";
    } else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) {
      this.splashText = "Happy new year!";
    }

    StringTranslate var2 = StringTranslate.getInstance();
    int var4 = this.height / 4 + 48;

    if (this.mc.isDemo()) {
      this.func_73972_b(var4, 24, var2);
    } else {
      this.func_73969_a(var4, 24, var2);
    }

    if (this.mc.hideQuitButton) {
      this.controlList.add(
          new GuiButton(0, this.width / 2 - 100, var4 + 24, var2.translateKey("menu.options")));
    } else {
      this.controlList.add(
          new GuiButton(
              0, this.width / 2 - 100, var4 + 24 + 12, 98, 20, var2.translateKey("menu.options")));
      this.controlList.add(
          new GuiButton(
              4, this.width / 2 + 2, var4 + 24 + 12, 98, 20, var2.translateKey("menu.quit")));
    }

    this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 24 + 12));
  }
Ejemplo n.º 24
0
  /**
   * Fired when a control is clicked. This is the equivalent of
   * ActionListener.actionPerformed(ActionEvent e).
   */
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (!par1GuiButton.enabled) {
      return;
    }

    if (par1GuiButton.id == 2) {
      String s = getSaveName(selectedWorld);

      if (s != null) {
        deleting = true;
        StringTranslate stringtranslate = StringTranslate.getInstance();
        String s1 = stringtranslate.translateKey("selectWorld.deleteQuestion");
        String s2 =
            (new StringBuilder())
                .append("'")
                .append(s)
                .append("' ")
                .append(stringtranslate.translateKey("selectWorld.deleteWarning"))
                .toString();
        String s3 = stringtranslate.translateKey("selectWorld.deleteButton");
        String s4 = stringtranslate.translateKey("gui.cancel");
        GuiYesNo guiyesno = new GuiYesNo(this, s1, s2, s3, s4, selectedWorld);
        mc.displayGuiScreen(guiyesno);
      }
    } else if (par1GuiButton.id == 1) {
      selectWorld(selectedWorld);
    } else if (par1GuiButton.id == 3) {
      mc.displayGuiScreen(new GuiCreateWorld(this));
    } else if (par1GuiButton.id == 6) {
      mc.displayGuiScreen(new GuiRenameWorld(this, getSaveFileName(selectedWorld)));
    } else if (par1GuiButton.id == 0) {
      mc.displayGuiScreen(parentScreen);
    } else {
      worldSlotContainer.actionPerformed(par1GuiButton);
    }
  }
Ejemplo n.º 25
0
  /** returns the name of the saved game */
  protected String getSaveName(int par1) {
    String s = ((SaveFormatComparator) saveList.get(par1)).getDisplayName();

    if (s == null || MathHelper.stringNullOrLengthZero(s)) {
      StringTranslate stringtranslate = StringTranslate.getInstance();
      s =
          (new StringBuilder())
              .append(stringtranslate.translateKey("selectWorld.world"))
              .append(" ")
              .append(par1 + 1)
              .toString();
    }

    return s;
  }
Ejemplo n.º 26
0
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    StringTranslate var1 = StringTranslate.getInstance();
    int var2 = 0;
    this.field_73888_d = var1.translateKey("options.chat.title");
    EnumOptions[] var3 = field_73891_a;
    int var4 = var3.length;

    for (int var5 = 0; var5 < var4; ++var5) {
      EnumOptions var6 = var3[var5];

      if (var6.getEnumFloat()) {
        this.controlList.add(
            new GuiSlider(
                var6.returnEnumOrdinal(),
                this.width / 2 - 155 + var2 % 2 * 160,
                this.height / 6 + 24 * (var2 >> 1),
                var6,
                this.field_73890_c.getKeyBinding(var6),
                this.field_73890_c.getOptionFloatValue(var6)));
      } else {
        this.controlList.add(
            new GuiSmallButton(
                var6.returnEnumOrdinal(),
                this.width / 2 - 155 + var2 % 2 * 160,
                this.height / 6 + 24 * (var2 >> 1),
                var6,
                this.field_73890_c.getKeyBinding(var6)));
      }

      ++var2;
    }

    this.controlList.add(
        new GuiButton(
            200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey("gui.done")));
  }
  @Override

  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    for (ModContainer mod : mods) {
      listWidth = Math.max(listWidth, getFontRenderer().getStringWidth(mod.getName()) + 10);
      listWidth = Math.max(listWidth, getFontRenderer().getStringWidth(mod.getVersion()) + 10);
    }
    listWidth = Math.min(listWidth, 150);
    StringTranslate translations = StringTranslate.getInstance();
    this.controlList.add(
        new GuiSmallButton(
            6, this.width / 2 - 75, this.height - 38, translations.translateKey("gui.done")));
    this.modList = new GuiSlotModList(this, mods, listWidth);
    this.modList.registerScrollButtons(this.controlList, 7, 8);
  }
Ejemplo n.º 28
0
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    this.viewportTexture =
        this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
    Calendar var1 = Calendar.getInstance();
    var1.setTime(new Date());

    if (var1.get(2) + 1 == 11 && var1.get(5) == 9) {
      this.splashText = "Happy birthday, ez!";
    } else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) {
      this.splashText = "Happy birthday, Notch!";
    } else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) {
      this.splashText = "Merry X-mas!";
    } else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) {
      this.splashText = "Happy new year!";
    }

    StringTranslate var2 = StringTranslate.getInstance();
    int var4 = this.height / 4 + 48;
    this.controlList.add(
        new GuiButton(1, this.width / 2 - 100, var4, var2.translateKey("menu.singleplayer")));
    this.controlList.add(
        this.multiplayerButton =
            new GuiButton(
                2, this.width / 2 - 100, var4 + 24, var2.translateKey("menu.multiplayer")));
    this.controlList.add(
        new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey("menu.mods")));

    if (this.mc.hideQuitButton) {
      this.controlList.add(
          new GuiButton(0, this.width / 2 - 100, var4 + 72, var2.translateKey("menu.options")));
    } else {
      this.controlList.add(
          new GuiButton(
              0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey("menu.options")));
      this.controlList.add(
          new GuiButton(
              4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey("menu.quit")));
    }

    this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));

    if (this.mc.session == null) {
      this.multiplayerButton.enabled = false;
    }
  }
Ejemplo n.º 29
0
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    this.viewportTexture =
        this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
    Calendar var1 = Calendar.getInstance();
    var1.setTime(new Date());

    if (var1.get(2) + 1 == 11 && var1.get(5) == 9) {
      this.splashText = "Happy birthday, ez!";
    } else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) {
      this.splashText = "Happy birthday, Notch!";
    } else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) {
      this.splashText = "Merry X-mas!";
    } else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) {
      this.splashText = "Happy new year!";
    } else if (var1.get(2) + 1 == 10 && var1.get(5) == 31) {
      this.splashText = "OOoooOOOoooo! Spooky!";
    }

    StringTranslate var2 = StringTranslate.getInstance();
    int var4 = this.height / 4 + 48;

    if (this.mc.isDemo()) {
      this.addDemoButtons(var4, 24, var2);
    } else {
      this.addSingleplayerMultiplayerButtons(var4, 24, var2);
    }

    this.func_96137_a(var2, var4, 24);

    if (this.mc.hideQuitButton) {
      this.buttonList.add(
          new GuiButton(0, this.width / 2 - 100, var4 + 72, var2.translateKey("menu.options")));
    } else {
      this.buttonList.add(
          new GuiButton(
              0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey("menu.options")));
      this.buttonList.add(
          new GuiButton(
              4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey("menu.quit")));
    }

    this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));
    this.field_92025_p = "";
    String var5 = System.getProperty("os_architecture");
    String var6 = System.getProperty("java_version");

    if ("ppc".equalsIgnoreCase(var5)) {
      this.field_92025_p =
          ""
              + EnumChatFormatting.BOLD
              + "Notice!"
              + EnumChatFormatting.RESET
              + " PowerPC compatibility will be dropped in Minecraft 1.6";
    } else if (var6 != null && var6.startsWith("1.5")) {
      this.field_92025_p =
          ""
              + EnumChatFormatting.BOLD
              + "Notice!"
              + EnumChatFormatting.RESET
              + " Java 1.5 compatibility will be dropped in Minecraft 1.6";
    }

    this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
    this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
    int var7 = Math.max(this.field_92023_s, this.field_92024_r);
    this.field_92022_t = (this.width - var7) / 2;
    this.field_92021_u = ((GuiButton) this.buttonList.get(0)).yPosition - 24;
    this.field_92020_v = this.field_92022_t + var7;
    this.field_92019_w = this.field_92021_u + 24;
  }
Ejemplo n.º 30
0
 public void addChatMessageTranslate(String var1) {
   StringTranslate var2 = StringTranslate.getInstance();
   String var3 = var2.translateKey(var1);
   this.addChatMessage(var3);
 }