Package net.minecraft.client.gui

Examples of net.minecraft.client.gui.GuiButton


    nameEntryField.setTextColor(16777215);
    nameEntryField.setText(packet.baseName);
   
    //Add buttons
    teamButtons = new GuiButton[4];
    teamButtons[0] = new GuiButton(0, width / 2 - 128 + 6, height / 2 - 94 + 38, 58, 20, "No Team");
    teamButtons[1] = new GuiButton(1, width / 2 - 128 + 68, height / 2 - 94 + 38, 58, 20, "Spectator");
    teamButtons[2] = new GuiButton(2, width / 2 - 128 + 130, height / 2 - 94 + 38, 58, 20, "Team 1");
    teamButtons[3] = new GuiButton(3, width / 2 - 128 + 192, height / 2 - 94 + 38, 58, 20, "Team 2");

        buttonList.addAll(Arrays.asList(teamButtons).subList(0, 4));
   
    mapButtons = new GuiButton[5];
    for(int i = 0; i < 5; i++)
    {
      mapButtons[i] = new GuiButton(4 + i, width / 2 - 128 + 28, height / 2 - 94 + 75 + 22 * i, 200, 20, "Map " + (i + 1));
      buttonList.add(mapButtons[i]);
    }
   
    leftButton = new GuiButton(9, width / 2 - 128 + 6, height / 2 - 94 + 119, 20, 20, "<");
    rightButton = new GuiButton(10, width / 2 + 128 - 26, height / 2 - 94 + 119, 20, 20, ">");
    buttonList.add(leftButton);
    buttonList.add(rightButton);
  }
View Full Code Here


    @Override
  public void initGui()
  {
    super.initGui();
    buttonList.add(new GuiButton(0, width / 2 - 166, height / 2 + 63, 93, 20, "Passenger Guns"));
    buttonList.add(new GuiButton(1, width / 2 - 68, height / 2 + 63, 68, 20, "Repair"));
  }
View Full Code Here

    if(classMenu)
    {
      for(int i = 0; i < classChoices.length; i++)
      {
        if(classChoices[i] != null)
          buttonList.add(new GuiButton(i, width / 2 - 128 + 9, height / 2 - guiHeight / 2 + 24 + 24 * i, 73, 20, classChoices[i].name));
      }
    }
    else
    {
      if(teamChoices == null)
      {
        FMLClientHandler.instance().getClient().displayGuiScreen(null);
        return;   
      }
      for(int i = 0; i < teamChoices.length; i++)
      {
        if(teamChoices[i] != null)
          buttonList.add(new GuiButton(i, width / 2 - 128 + 10, height / 2 - guiHeight / 2 + 24 + 24 * i, 236, 20, "\u00a7" + teamChoices[i].textColour + teamChoices[i].name));
        else buttonList.add(new GuiButton(i, width / 2 - 128 + 10, height / 2 - guiHeight / 2 + 24 + 24 * i, 236, 20, "No Team / Builder"));
      }
    }
  }
View Full Code Here

  public void initGui()
  {
    super.initGui();
      for(int i = 0; i < partsToDraw.size(); i++)
      {
        buttonList.add(new GuiButton(i, 0, 0, 55, 20, "Repair"));
      }
  }
View Full Code Here

    {
      int y = 43;
      for(int i = 0; i < partsToDraw.size(); i++)
      {
        DriveablePart part = partsToDraw.get(i);
        GuiButton button = (GuiButton)buttonList.get(i);
        button.xPosition = guiOriginX + 9;
        button.yPosition = part.health <= 0 ? guiOriginY + y : -1000;
        y += part.health <= 0 ? 40 : 20;
      }
    }
View Full Code Here

  public void initGui()
  {
    super.initGui();
    DriveableType type = entity.getDriveableType();
    //Cargo button
    GuiButton cargoButton = new GuiButton(0, width / 2 - 60, height / 2 - 71, 58, 20, "Cargo");
    cargoButton.enabled = type.numCargoSlots > 0;
    buttonList.add(cargoButton);
   
    //Gun button
    GuiButton gunsButton = new GuiButton(1, width / 2 + 2, height / 2 - 71, 58, 20, "Guns");
    gunsButton.enabled = type.ammoSlots() > 0;
    buttonList.add(gunsButton);
   
    //Fuel button
    GuiButton fuelButton = new GuiButton(2, width / 2 -60, height / 2 - 49, 58, 20, "Fuel");
    fuelButton.enabled = type.fuelTankSize > 0;
    buttonList.add(fuelButton);
   
    //Missile / Shell Button
    GuiButton missileButton = new GuiButton(3, width / 2 + 2, height / 2 - 49, 58, 20, entity.getMissileInventoryName());
    missileButton.enabled = type.numMissileSlots > 0;
    buttonList.add(missileButton);
   
    //Mine / Bomb Button
    GuiButton bombButton = new GuiButton(5, width / 2 + 2, height / 2 - 27, 58, 20, entity.getBombInventoryName());
    bombButton.enabled = type.numBombSlots > 0;
    buttonList.add(bombButton);
   
    //Repair button
    buttonList.add(new GuiButton(4, width / 2 - 60, height / 2 - 27, 58, 20, "Repair"));
  }
View Full Code Here

 
  @Override
  public void initGui()
  {
    super.initGui();
    buttonList.add(new GuiButton(0, width / 2 + 22, height / 2 + 63, 40, 20, "Craft"));
  }
View Full Code Here

    Keyboard.enableRepeatEvents(true);

    //buttonList.add(buttonTrade = new GuiButton(1, width / 2 - 100, 4 + ySize, 98, 20, StringUtil.localize("gui.mail.catalogue.trade")));
    //buttonList.add(buttonClose = new GuiButton(0, (width - 100) / 2, 4 + ySize, 98, 20, StringUtil.localize("gui.mail.catalogue.close")));

    buttonList.add(new GuiButton(2, width / 2 + 44, guiTop + 150, 12, 20, ">"));
    buttonList.add(new GuiButton(3, width / 2 - 58, guiTop + 150, 12, 20, "<"));

    buttonList.add(buttonFilter = new GuiButton(4, (width / 2) - 44, guiTop + 150, 42, 20, StringUtil.localize("gui.mail.filter.all")));

    buttonList.add(buttonCopy = new GuiButton(5, width / 2, guiTop + 150, 42, 20, StringUtil.localize("gui.mail.address.copy")));
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();

    buttonList.add(new GuiButton(1, guiLeft + 12, guiTop + 10, 12, 18, "<"));
    buttonList.add(new GuiButton(2, guiLeft + 130, guiTop + 10, 12, 18, ">"));

  }
View Full Code Here

    buttonList.clear();
    buttonList.add(new SmallGuiButton(0, right - 15, guiTop + 5, 10 ,10 ,">")); // Next pageAll
    buttonList.add(new SmallGuiButton(1, right - 90, guiTop + 5, 10, 10, "<")); // Prev pageAll
    buttonList.add(new SmallGuiButton(2, right - 15, guiTop + 135, 10 ,10 ,">")); // Next pageAll
    buttonList.add(new SmallGuiButton(3, right - 90, guiTop + 135, 10, 10, "<")); // Prev pageAll
    buttonList.add(new GuiButton(4, right - 39, bottom - 27, 35, 20, "Save")); // Prev pageAll
  }
View Full Code Here

TOP

Related Classes of net.minecraft.client.gui.GuiButton

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.