예제 #1
1
 @Override
 public void initGui() {
   obsidiFile = new File(System.getProperty("user.dir") + "/ObsidiCode/Test/SimpleMiner.oc");
   this.buttonList.add(
       new GuiButton(
           saveButton, this.width / 2 + 5, this.height / 2 + 125, 100, 20, "Save and Exit"));
   this.buttonList.add(
       new GuiButton(resetButton, this.width / 2 - 105, this.height / 2 + 125, 100, 20, "Reset"));
   loadFile();
   if (!text.toString().contains("_") && text.toString().equals("")) text.append(cursor);
   cursorLocation = text.length() - 1;
   super.initGui();
 }
 @SuppressWarnings("unchecked")
 @Override
 public void initGui() {
   super.initGui();
   this.buttonList.clear();
   final int var5 = (this.width - this.xSize) / 2;
   final int var6 = (this.height - this.ySize) / 2;
   this.checkboxRedstoneSignal =
       new GuiElementCheckbox(0, this, this.width / 2 - 78, var6 + 18, "Opens on Redstone Signal");
   this.checkboxPlayerDistance =
       new GuiElementCheckbox(1, this, this.width / 2 - 78, var6 + 33, "Player is within: ");
   this.dropdownPlayerDistance =
       new GuiElementDropdown(
           2, this, var5 + 105, var6 + 34, "1 Meter", "2 Meters", "5 Meters", "10 Meters");
   this.checkboxOpenForPlayer =
       new GuiElementCheckbox(3, this, this.width / 2 - 62, var6 + 49, "Player name is: ");
   this.textBoxPlayerToOpenFor =
       new GuiElementTextBox(
           4, this, this.width / 2 - 55, var6 + 64, 110, 15, "", false, 16, false);
   this.checkboxInvertSelection =
       new GuiElementCheckbox(5, this, this.width / 2 - 78, var6 + 80, "Invert Selection");
   this.checkboxHorizontalMode =
       new GuiElementCheckbox(6, this, this.width / 2 - 78, var6 + 96, "Horizontal Mode");
   this.buttonList.add(this.checkboxRedstoneSignal);
   this.buttonList.add(this.checkboxPlayerDistance);
   this.buttonList.add(this.dropdownPlayerDistance);
   this.buttonList.add(this.checkboxOpenForPlayer);
   this.buttonList.add(this.textBoxPlayerToOpenFor);
   this.buttonList.add(this.checkboxInvertSelection);
   this.buttonList.add(this.checkboxHorizontalMode);
 }
  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();
    this.buttonList.clear();

    if (this.initialized) {
      final int var5 = (this.width - this.width / 4) / 2;
      final int var6 = (this.height - this.height / 4) / 2;

      this.buttonFlag_width = 81;
      this.buttonFlag_height = 58;
      this.buttonFlag_xPosition = this.width / 2 - buttonFlag_width / 2;
      this.buttonFlag_yPosition = this.height / 2 - this.height / 3 + 10;

      this.buttonList.add(
          new GuiElementGradientButton(
              0,
              this.width / 2 - this.width / 3 + 15,
              this.height / 2 - this.height / 4 - 15,
              50,
              15,
              "Close"));
      int width = (int) (var5 / 1.0F);
      this.buttonList.add(
          new GuiElementGradientButton(
              1,
              this.width / 2 - width / 2,
              (int) (this.buttonFlag_yPosition + this.buttonFlag_height + 60),
              width,
              20,
              "Join " + this.spaceRaceData.getTeamName()));
    }
  }
  public void initGui() {

    int guiX = (height - guiheight);
    int guiY = (width - guiwidth);
    GuiButton DevButton;
    // buttonList.add(DevButton = new GuiButton(0, guiX + 10, guiY + 30, 20, 10, "Enter"));
    super.initGui();
  }
예제 #5
0
  @Override
  public void initGui() {
    super.initGui();

    if (stand == null) {
      mc.displayGuiScreen(null);
    } else {
      Keyboard.enableRepeatEvents(true);

      buttonList.clear();

      this.guiLeft = (this.width - this.xSize) / 2;
      this.guiTop = (this.height - this.ySize) / 2;

      buttonList.add(new GuiButton(ID_PAGE_LEFT, width / 2 - 6, height / 2 + 54, 20, 20, "<"));
      buttonList.add(new GuiButton(ID_PAGE_RIGHT, width / 2 + 62, height / 2 + 54, 20, 20, ">"));
      buttonList.add(
          new GuiButton(
              ID_DONE_SELECT, width / 2 + 16, height / 2 + 54, 44, 20, I18n.format("gui.done")));

      // 4, 5, 6, 7, 8 = taken.

      addToolButton(ID_NONE, 0);
      addToolButton(ID_HAT_COLOUR_SWAP, 1);
      addToolButton(ID_RANDOM, 2);

      buttonList.add(new GuiButton(ID_CLOSE, width - 22, 2, 20, 20, "X"));

      pageNumber = 0;

      if (!stand.hatName.equalsIgnoreCase("")) {
        for (int i = 0; i < hatsToShow.size(); i++) {
          String hatName = (String) hatsToShow.get(i);
          if (hatName.equalsIgnoreCase(stand.hatName)) {
            i -= i % 6;
            pageNumber = i / 6;
            break;
          }
        }
      }

      updateButtonList();

      searchBar =
          new GuiTextField(0, this.fontRendererObj, this.width / 2 - 65, height - 24, 150, 20);
      searchBar.setMaxStringLength(255);
      searchBar.setText(StatCollector.translateToLocal("hats.gui.search"));
      searchBar.setTextColor(0xAAAAAA);
      searchBar.setVisible(enabledSearchBar);
    }
  }
예제 #6
0
  @Override
  public void initGui() {

    int guiX = (height - guiheight);
    int guiY = (width - guiwidth);
    GuiButton DevButton;

    fontRendererObj.drawString(
        "The Book of the damned English Translation Edition by: " + owner,
        guiX + 40,
        guiY + 5,
        0xFFFFFF);

    buttonList.add(DevButton = new GuiButton(0, guiX + 10, guiY + 30, 20, 10, "Spells"));

    super.initGui();
  }
예제 #7
0
 @Override // Opened and resized
 public void initGui() {
   super.initGui(); // I see this done a ton and I don't understand why
   // buttonNext = new GuiButton(1,);
   buttons.add(new GuiButton(0, 172, 410, 124, 20, "Previous"));
   buttons.add(new GuiButton(1, 296, 410, 124, 20, "Next"));
   buttons.add(new GuiButton(2, 504, 410, 248, 20, "Go"));
   int x = 3;
   for (int i = 98; i < 393; i += 20) {
     buttons.add(new GuiButton(x, 172, i, 248, 20, "Stuff " + x));
     x++;
   }
   x = 0;
   status.setCanLoseFocus(true);
   status.setText("Status Message");
   status.setFocused(false);
 }
예제 #8
0
 @Override
 public void initGui() {
   super.initGui();
   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"));
     }
   }
 }
예제 #9
0
  @Override
  public void initGui() {
    super.initGui();

    if (TFCOptions.enableDebugMode) {
      buttonList.clear();
      int l = (width - xSize) / 2;
      int i1 = (height - ySize) / 2;
      buttonList.add(
          new GuiButton(0, l + 20, i1 + 118, 66, 20, StringUtil.localize("gui.Calendar.1Hour")));
      buttonList.add(
          new GuiButton(1, l + 20, i1 + 137, 66, 20, StringUtil.localize("gui.Calendar.1Day")));
      buttonList.add(
          new GuiButton(2, l + 20, i1 + 156, 66, 20, StringUtil.localize("gui.Calendar.1Week")));
      buttonList.add(
          new GuiButton(3, l + 85, i1 + 118, 66, 20, StringUtil.localize("gui.Calendar.1Month")));
      buttonList.add(
          new GuiButton(4, l + 85, i1 + 137, 66, 20, StringUtil.localize("gui.Calendar.1Year")));
    }
  }
예제 #10
0
 @Override
 public final void initGui() {
   super.initGui();
   ComponentScreenManager.init();
   build(ComponentScreenManager.components);
 }
예제 #11
0
 @Override
 public void initGui() {
   buttonList.add(gb = new GuiButton(1, positionX, positionY, "text"));
   super.initGui();
 }
 /**
  * Adds the buttons (and other controls) to the screen in question. Called when the GUI is
  * displayed and when the window resizes, the buttonList is cleared beforehand.
  */
 public void initGui() {
   this.proxy.init();
   super.initGui();
 }
예제 #13
0
  @Override
  public final void initGui() {
    super.initGui();
    buttonList.clear();
    guiTick = 0;

    int j = (width - xSize) / 2;
    int k = (height - ySize) / 2 - 8;

    String file = HandbookRegistry.TOC.getTabImageFile();
    if (!this.isLimitedView()) {
      buttonList.add(
          new ImagedGuiButton(
              10,
              j - 20,
              17 + k + 163,
              20,
              20,
              220,
              0,
              "-",
              0,
              false,
              file,
              RotaryCraft.class)); // Prev Page
      buttonList.add(
          new ImagedGuiButton(
              11,
              j - 20,
              17 + k + 143,
              20,
              20,
              220,
              20,
              "+",
              0,
              false,
              file,
              RotaryCraft.class)); // Next page
      buttonList.add(
          new ImagedGuiButton(
              15,
              j - 20,
              17 + k + 183,
              20,
              20,
              220,
              20,
              "<<",
              0,
              false,
              file,
              RotaryCraft.class)); // First page
    }
    buttonList.add(new GuiButton(12, j + xSize - 27, k + 6, 20, 20, "X")); // Close gui button

    HandbookEntry h = this.getEntry();

    if (h.hasSubpages()
        || ((h instanceof HandbookRegistry) && ((HandbookRegistry) h).getBonusSubpages() > 0)) {
      buttonList.add(new GuiButton(13, j + xSize - 27, k + 40, 20, 20, ">"));
      buttonList.add(new GuiButton(14, j + xSize - 27, k + 60, 20, 20, "<"));
    }
    if (!this.isLimitedView()) this.addTabButtons(j, k);
    this.onInitGui(j, k, h);
  }