Ejemplo n.º 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;
 }
  @Override
  public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);
    drawDefaultBackground();
    drawGuiContainerBackgroundLayer(par3, par1, par2);
    drawGuiContainerForegroundLayer();

    for (int i = 0; i < controlList.size(); i++) {
      GuiButton guibutton = (GuiButton) controlList.get(i);
      guibutton.drawButton(mc, par1, par2);
    }
  }
Ejemplo n.º 3
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   controlList.clear();
   Keyboard.enableRepeatEvents(true);
   controlList.add(new GuiButton(0, width / 2 - 100, height / 4 + 120, "Done"));
   // Spout start
   controlList.add(
       unicode = new GuiButton(1, width / 2 - 100, height / 4 + 142, "Send As Unicode"));
   if (!ConfigReader.sendColorsAsUnicode) {
     unicode.displayString = "Send As Plain Text";
   }
   if (!this.mc.theWorld.isRemote) {
     unicode.drawButton = false;
     unicode.enabled = false;
   }
   // Spout end
 }