Package net.minecraft.client.gui

Examples of net.minecraft.client.gui.GuiButton


      int xButton = ((width - xSize) / 2);
    int yButton = ((height - ySize) / 2) - buttonHeight;
   
    int id = 0;
   
    infoButton = new GuiButton(id++, xButton, yButton, 40, buttonHeight, "Info");   
    controlList.add(infoButton);
   
    townHallInv = new GuiButton(id++, xButton+40, yButton, 60, buttonHeight, "Town Inv.");
    controlList.add(townHallInv);
     
  
  }
View Full Code Here


      GL11.glDisable(GL11.GL_DEPTH_TEST)
      this.infoButton.drawButton(this.mc, par1, par2);
      //TODO: highlight the tab that is currently selected.
      for (int var44 = 0; var44 < this.controlList.size(); ++var44)
          {
              GuiButton var55 = (GuiButton)this.controlList.get(var44);
              var55.drawButton(this.mc, par1, par2);
          }
     
      RenderHelper.enableGUIStandardItemLighting();
      GL11.glPushMatrix();
      GL11.glTranslatef((float)var4, (float)var5, 0.0F);
View Full Code Here

    public void initGui()
    {
      super.initGui();
        this.controlList.clear();
        Keyboard.enableRepeatEvents(true);
        this.controlList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 65, "Done"));
        this.inputField = new GuiTextField(this.fontRenderer,2, this.height/4 + 50, this.width - 3, 12);
        this.inputField.setMaxStringLength(70);
        this.inputField.setFocused(true);
        this.inputField.setCanLoseFocus(false);
    }
View Full Code Here

    super.initGui();
   
    int xButton = (width-xSize) / 2;
    int yButton = ((height-ySize)/2)-20;
   
    controlList.add(new GuiButton(1,xButton,yButton, 40, 20,"Info"));
    controlList.add(new GuiButton(0, xButton+40, yButton, 60, 20, "House Inv."));
   
  }
View Full Code Here

    RenderHelper.disableStandardItemLighting();
    GL11.glDisable(GL11.GL_LIGHTING);
    GL11.glDisable(GL11.GL_DEPTH_TEST)
    for (int var44 = 0; var44 < this.controlList.size(); ++var44)
    {
      GuiButton var55 = (GuiButton)this.controlList.get(var44);
      var55.drawButton(this.mc, par1, par2);
    }
       
    RenderHelper.enableGUIStandardItemLighting();
    GL11.glPushMatrix();
    GL11.glTranslatef((float)var4, (float)var5, 0.0F);
View Full Code Here

    this.controlList.clear();

    int id = 0;

    this.btnDecX = new GuiButton(id++, this.centerX - 50, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecX);

    this.btnAmountX = new GuiButton(id++, this.centerX - 15, this.centerY - 30, 30, 20, Integer.toString(this.settings.increments[this.incrementX]));
    this.controlList.add(this.btnAmountX);

    this.btnIncX = new GuiButton(id++, this.centerX + 20, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncX);

    this.btnDecY = new GuiButton(id++, this.centerX - 50, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecY);

    this.btnAmountY = new GuiButton(id++, this.centerX - 15, this.centerY - 5, 30, 20, Integer.toString(this.settings.increments[this.incrementY]));
    this.controlList.add(this.btnAmountY);

    this.btnIncY = new GuiButton(id++, this.centerX + 20, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncY);

    this.btnDecZ = new GuiButton(id++, this.centerX - 50, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecZ);

    this.btnAmountZ = new GuiButton(id++, this.centerX - 15, this.centerY + 20, 30, 20, Integer.toString(this.settings.increments[this.incrementZ]));
    this.controlList.add(this.btnAmountZ);

    this.btnIncZ = new GuiButton(id++, this.centerX + 20, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncZ);

    this.btnDecLayer = new GuiButton(id++, this.width - 90, this.height - 150, 25, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecLayer);

    this.btnIncLayer = new GuiButton(id++, this.width - 35, this.height - 150, 25, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncLayer);

    this.btnHide = new GuiButton(id++, this.width - 90, this.height - 105, 80, 20, this.strTranslate.translateKey(this.settings.isRenderingSchematic ? "schematic.hide" : "schematic.show"));
    this.controlList.add(this.btnHide);

    this.btnMove = new GuiButton(id++, this.width - 90, this.height - 80, 80, 20, this.strTranslate.translateKey("schematic.movehere"));
    this.controlList.add(this.btnMove);

    this.btnFlip = new GuiButton(id++, this.width - 90, this.height - 55, 80, 20, this.strTranslate.translateKey("schematic.flip"));
    this.controlList.add(this.btnFlip);

    this.btnRotate = new GuiButton(id++, this.width - 90, this.height - 30, 80, 20, this.strTranslate.translateKey("schematic.rotate"));
    this.controlList.add(this.btnRotate);

    this.btnMaterials = new GuiButton(id++, 10, this.height - 30, 80, 20, this.strTranslate.translateKey("schematic.materials"));
    this.controlList.add(this.btnMaterials);

    this.btnMaterials.enabled = this.settings.schematic != null;
  }
View Full Code Here

    this.controlList.clear();

    int id = 0;

    this.btnPointA = new GuiButton(id++, this.centerX - 130, this.centerY - 55, 100, 20, this.strTranslate.translateKey("schematic.point.red"));
    this.controlList.add(this.btnPointA);

    this.btnDecAX = new GuiButton(id++, this.centerX - 130, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecAX);

    this.btnAmountAX = new GuiButton(id++, this.centerX - 95, this.centerY - 30, 30, 20, Integer.toString(this.settings.increments[this.incrementAX]));
    this.controlList.add(this.btnAmountAX);

    this.btnIncAX = new GuiButton(id++, this.centerX - 60, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncAX);

    this.btnDecAY = new GuiButton(id++, this.centerX - 130, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecAY);

    this.btnAmountAY = new GuiButton(id++, this.centerX - 95, this.centerY - 5, 30, 20, Integer.toString(this.settings.increments[this.incrementAY]));
    this.controlList.add(this.btnAmountAY);

    this.btnIncAY = new GuiButton(id++, this.centerX - 60, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncAY);

    this.btnDecAZ = new GuiButton(id++, this.centerX - 130, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecAZ);

    this.btnAmountAZ = new GuiButton(id++, this.centerX - 95, this.centerY + 20, 30, 20, Integer.toString(this.settings.increments[this.incrementAZ]));
    this.controlList.add(this.btnAmountAZ);

    this.btnIncAZ = new GuiButton(id++, this.centerX - 60, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncAZ);

    this.btnPointB = new GuiButton(id++, this.centerX + 30, this.centerY - 55, 100, 20, this.strTranslate.translateKey("schematic.point.blue"));
    this.controlList.add(this.btnPointB);

    this.btnDecBX = new GuiButton(id++, this.centerX + 30, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecBX);

    this.btnAmountBX = new GuiButton(id++, this.centerX + 65, this.centerY - 30, 30, 20, Integer.toString(this.settings.increments[this.incrementBX]));
    this.controlList.add(this.btnAmountBX);

    this.btnIncBX = new GuiButton(id++, this.centerX + 100, this.centerY - 30, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncBX);

    this.btnDecBY = new GuiButton(id++, this.centerX + 30, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecBY);

    this.btnAmountBY = new GuiButton(id++, this.centerX + 65, this.centerY - 5, 30, 20, Integer.toString(this.settings.increments[this.incrementBY]));
    this.controlList.add(this.btnAmountBY);

    this.btnIncBY = new GuiButton(id++, this.centerX + 100, this.centerY - 5, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncBY);

    this.btnDecBZ = new GuiButton(id++, this.centerX + 30, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.decrease"));
    this.controlList.add(this.btnDecBZ);

    this.btnAmountBZ = new GuiButton(id++, this.centerX + 65, this.centerY + 20, 30, 20, Integer.toString(this.settings.increments[this.incrementBZ]));
    this.controlList.add(this.btnAmountBZ);

    this.btnIncBZ = new GuiButton(id++, this.centerX + 100, this.centerY + 20, 30, 20, this.strTranslate.translateKey("schematic.increase"));
    this.controlList.add(this.btnIncBZ);

    this.btnEnable = new GuiButton(id++, this.width - 210, this.height - 30, 50, 20, this.strTranslate.translateKey(this.settings.isRenderingGuide ? "schematic.disable" : "schematic.enable"));
    this.controlList.add(this.btnEnable);

    this.tfFilename = new GuiTextField(this.fontRenderer, this.width - 155, this.height - 29, 100, 18);

    this.btnSave = new GuiButton(id++, this.width - 50, this.height - 30, 40, 20, this.strTranslate.translateKey("schematic.save"));
    this.btnSave.enabled = this.settings.isRenderingGuide;
    this.controlList.add(this.btnSave);

    this.tfFilename.setMaxStringLength(20);
    this.tfFilename.setText(this.filename);
View Full Code Here

    super(unlocalizedName);
  }

  @Override
  public void onOpened(IGuiLexiconEntry gui) {
    button = new GuiButton(101, gui.getLeft() + 30, gui.getTop() + gui.getHeight() - 50, gui.getWidth() - 60, 20, StatCollector.translateToLocal("botaniamisc.playVideo"));
    gui.getButtonList().add(button);
  }
View Full Code Here

    public void drawScreen(int mouseX, int mouseY, float par3) {
        super.drawScreen(mouseX, mouseY, par3);

        ArrayList<String> tooltip = new ArrayList<String>();
        for(Object buttonObj : buttonList) {
            GuiButton button = (GuiButton) buttonObj;
            if(button.func_146115_a()) {
                if(button.id == 0) {
                    tooltip.add(I18n.format(Localizations.CLEAR_CRAFT_MATRIX));
                } else if(button.id == 1) {
                    tooltip.add(I18n.format(Localizations.SAVE_RECIPE));
                    tooltip.add(I18n.format(Localizations.CLICK_A_SLOT));
View Full Code Here

  @Override
  public void initGui()
  {
    buttonList.clear();
    buttonList.add(new GuiButton(0, width / 2 - 100, height / 4 + 72 + 12, "Update"));
    buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 96 + 12, "Cancel"));
    ((GuiButton)buttonList.get(0)).enabled = !MekanismUtils.noUpdates() && !ThreadClientUpdate.hasUpdated;
  }
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.