Package net.minecraft.client.gui

Examples of net.minecraft.client.gui.GuiButton


  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();
    this.buttonList.clear();
    this.buttonList.add(new GuiButton(0, guiLeft + 10, guiTop + 119, 30, 20, "-"));
    this.buttonList.add(new GuiButton(1, guiLeft + 110, guiTop + 119, 30, 20, "+"));
    this.buttonList.add(new SmallGuiButton(2, guiLeft + 30, guiTop + 107, 40, 10, StringUtil.translate(PREFIX + "Remove")));
    this.buttonList.add(new SmallGuiButton(3, guiLeft + 80, guiTop + 107, 40, 10, StringUtil.translate(PREFIX + "Add")));
    this.buttonList.add(new SmallGuiButton(4, guiLeft + 87, guiTop + 4, 10, 10, "<"));
    this.buttonList.add(new SmallGuiButton(5, guiLeft + 130, guiTop + 4, 10, 10, ">"));
  }
View Full Code Here


  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, xCenter - 55, bottom - 25, 50,20,"OK"));
    buttonList.add(new GuiButton(1, xCenter + 5, bottom - 25, 50,20,"Log"));
  }
View Full Code Here

      }
    }
    boolean handledButton = false;
    if (par3 == 0) {
      for (int l = 0; l < this.buttonList.size(); ++l) {
        GuiButton guibutton = (GuiButton) this.buttonList.get(l);
        if (guibutton.mousePressed(this.mc, par1, par2)) {
          this.selectedButton = guibutton;
          guibutton.func_146113_a(this.mc.getSoundHandler());
          this.actionPerformed(guibutton);
          handledButton = true;
          break;
        }
      }
View Full Code Here

    }
  }

  private boolean mouseCanPressButton(int par1, int par2) {
    for (int l = 0; l < this.buttonList.size(); ++l) {
      GuiButton guibutton = (GuiButton) this.buttonList.get(l);
      if (guibutton.mousePressed(this.mc, par1, par2)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

    super.initGui();

    int left = width / 2 - xSize / 2;
    int top = height / 2 - ySize / 2;

    buttonList.add(new GuiButton(0, left + 110, top + 103, 40, 20, ""))//DOWN
    buttonList.add(new GuiButton(1, left + 110, top + 43, 40, 20, ""))//UP
    buttonList.add(new GuiButton(2, left + 50, top + 53, 50, 20, ""));    //NORTH
    buttonList.add(new GuiButton(3, left + 50, top + 93, 50, 20, ""));    //SOUTH
    buttonList.add(new GuiButton(4, left + 10, top + 73, 40, 20, ""));    //WEST
    buttonList.add(new GuiButton(5, left + 100, top + 73, 40, 20, ""))//EAST
    buttonList.add(new GuiButton(6, left + 10, top + 23, 60, 20, ""));    //DEFAULT

    refreshButtons();
  }
View Full Code Here

    refreshButtons();
  }
 
  private void refreshButtons(){
    for (Object p : buttonList){
      GuiButton button = (GuiButton) p;
      button.displayString = isExtract(ForgeDirection.getOrientation(button.id));
    }
  }
View Full Code Here

      @Override
      public String getContent() {
        return _advancedExtractor.areItemsIncluded() ? "Included" : "Excluded";
      }}));

    buttonList.add(new GuiButton(1, width / 2 - 25, height / 2 - 34, 40, 20, "Sneaky"));
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();
    this.buttonList.clear();
      this.buttonList.add(new GuiButton(0, guiLeft + 10, guiTop + 179, 30, 20, "--"));
      ((GuiButton)this.buttonList.get(0)).visible = false;
    this.buttonList.add(new GuiButton(1, guiLeft + 10, guiTop + 139, 30, 20, "-"));
    this.buttonList.add(new GuiButton(2, guiLeft + 45, guiTop + 139, 30, 20, "+"));
      this.buttonList.add(new GuiButton(3, guiLeft + 140, guiTop + 179, 30, 20, "++"));
      ((GuiButton)this.buttonList.get(3)).visible = false;
    this.buttonList.add(new SmallGuiButton(4, guiLeft + 241, guiTop + 217, 30, 10, StringUtil.translate(PREFIX + "Open")));
    this.buttonList.add(new GuiCheckBox(5, guiLeft + 160, guiTop + 42, 16, 16, _tile.allowCC));
    this.buttonList.add(new SmallGuiButton(6, guiLeft + 162, guiTop + 60, 60, 10, StringUtil.translate(PREFIX + "EditTable")));
    if(!SimpleServiceLocator.ccProxy.isCC() && !LPConstants.DEBUG) {
      ((GuiButton)this.buttonList.get(5)).visible = false;
      ((GuiButton)this.buttonList.get(6)).visible = false;
    }
    this.buttonList.add(new GuiButton(7, guiLeft + 55, guiTop + 95, 70, 20, StringUtil.translate(PREFIX + "Authorize")));
    this.buttonList.add(new GuiButton(8, guiLeft + 175, guiTop + 95, 70, 20, StringUtil.translate(PREFIX + "Deauthorize")));
    this.buttonList.add(new GuiCheckBox(9, guiLeft + 160, guiTop + 74, 16, 16, _tile.allowAutoDestroy));
    MainProxy.sendPacketToServer(PacketHandler.getPacket(PlayerListRequest.class));
  }
View Full Code Here

      reHide = true;
    }
    super.initGui();

    buttonList.clear();
    buttonList.add(new GuiButton(0, right - 55, bottom - 25, 50,20,"Request")); // Request
    buttonList.add(new SmallGuiButton(1,  right - 15  , guiTop + 5, 10 ,10 ,">")); // Next page
    buttonList.add(new SmallGuiButton(2,  right - 90  , guiTop + 5, 10, 10, "<")); // Prev page
    buttonList.add(new SmallGuiButton(10, right - 148 , bottom - 15, 26, 10, "---")); // -64
    buttonList.add(new SmallGuiButton(4,  right - 148 , bottom - 26, 15, 10, "--")); // -10
    buttonList.add(new SmallGuiButton(5,  right - 132 , bottom - 26, 10, 10, "-")); // -1
View Full Code Here

    @Override
    public String getContent() {
      return _provider.isExcludeFilter() ? "Exclude" : "Include";
    }
       }));
       buttonList.add(new GuiButton(1, width / 2 - 90, height / 2 - 41, 38, 20, "Switch"));
  }
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.