Package net.minecraft.src

Examples of net.minecraft.src.GuiButton


    }

    public void initGui() {
        // Create Done button
        List<Object> controlList = new LinkedList<Object>();
        controlList.add(new GuiButton(ID_DONE,
                obf.getWindowWidth(this) / 2 - 100,
                obf.getWindowHeight(this) / 6 + 168, "Done"));
        obf.setControlList(this, controlList);
    }
View Full Code Here


          fontRenderer.getStringWidth(mod.getModName()) + 20);
    StringTranslate translations = StringTranslate.getInstance();
    int shiftx = 10;
    int shifty = 40;

    controlList.add(new GuiButton(0, shiftx, height - 30, fontRenderer
        .getStringWidth("Back") + 8, 20, "Back"));
    shiftx += fontRenderer.getStringWidth("Back") + 12;
    controlList.add(new GuiButton(1, shiftx, height - 30, fontRenderer
        .getStringWidth("Update Manager Forum Topic") + 8, 20,
        "Update Manager Forum Topic"));
    shiftx += fontRenderer.getStringWidth("Update Manager Forum Topic") + 12;
    controlList.add(new GuiButton(2, shiftx, height - 30, fontRenderer
        .getStringWidth("MotW") + 8, 20, "MotW"));
    shiftx += fontRenderer.getStringWidth("MotW") + 12;
    controlList.add(new GuiButton(3, shiftx, height - 30, fontRenderer
        .getStringWidth("Settings") + 8, 20, "Settings"));
    shiftx += fontRenderer.getStringWidth("Settings") + 12;
    controlList.add(new GuiButton(4, width
        - fontRenderer.getStringWidth("Website") - 12, shifty,
        fontRenderer.getStringWidth("Website") + 8, 20, "Website"));
    shifty += 22;
    controlList.add(new GuiButton(5, width
        - fontRenderer.getStringWidth("Changelog") - 12, shifty,
        fontRenderer.getStringWidth("Changelog") + 8, 20, "Changelog"));
    shifty += 22;
    controlList.add(new GuiButton(6, width
        - fontRenderer.getStringWidth("Download") - 12, shifty,
        fontRenderer.getStringWidth("Download") + 8, 20, "Download"));
    controlList.add(new GuiButton(7, shiftx, height - 30, fontRenderer
        .getStringWidth("View Downloaded Mods") + 8, 20,
        "View Downloaded Mods"));
    for (int i = UpdateManager.online ? 4 : 1; i <= 6; i++)
      ((GuiButton) controlList.get(i)).enabled = i == 3;
View Full Code Here

  }

  public void selectModIndex(int var1) {
    selected = var1;
    UpdateManagerMod mod = mods.get(var1);
    GuiButton bWebsite = (GuiButton) controlList.get(4);
    GuiButton bChangelog = (GuiButton) controlList.get(5);
    GuiButton bDownload = (GuiButton) controlList.get(6);

    if (UpdateManager.online) {
      bWebsite.enabled = true;
      bChangelog.enabled = mod.getChangelogURL() != null;
      bDownload.enabled = mod.getDirectDownloadURL() != null
View Full Code Here

  int updateDownloads() {
    if (selected < 0)
      return 0;
    int i = ThreadDownloadMod.downloadings.size();
    GuiButton bDownload = (GuiButton) controlList.get(6);
    if (mods.get(selected).getDirectDownloadURL() != null
        && !ThreadDownloadMod.downloadings.contains(mods.get(selected)
            .getModName()))
      bDownload.enabled = true;
View Full Code Here

  public void initGui(){
    timeField = new GuiRestrictedTextField(fontRenderer, 10, 90, 50, 16, "1234567890");
    timeField.setMaxStringLength(6);
    timeField.setText(""+Settings.getInt("checkDelay"));
    controlList.clear();
    controlList.add(new GuiButton(0, 10, 30, fontRenderer.getStringWidth("Back") + 8, 20, "Back"));
    controlList.add(new GuiButton(1, 65, 88, fontRenderer.getStringWidth("Set") + 8, 20 ,"Set"));
    buttonSMPCheck = new GuiButton(2, 10, 115, fontRenderer.getStringWidth("Check for Updates On SMP: Yes") + 8, 20, "Check for Updates On SMP: " + (Settings.getBoolean("smpEnable") ? "Yes" : "No" ));
    controlList.add(buttonSMPCheck);
    buttonAutoDownload = new GuiButton(3, 10, 140, fontRenderer.getStringWidth("Automatically Download outdated Mods: Yes") + 8, 20, "Automatically Download outdated Mods: " + (Settings.getBoolean("autoDownload") ? "Yes" : "No" ));
    controlList.add(buttonAutoDownload);
    super.initGui();
  }
View Full Code Here

  }

  public void initGui() {
    super.initGui();
    controlList.clear();
    controlList.add(new GuiButton(0, 5, 5, fontRenderer
        .getStringWidth("View Raw") + 8, 20, "View Raw"));
    controlList.add(new GuiButton(1, width - 13
        - fontRenderer.getStringWidth("Back"), 5, fontRenderer
        .getStringWidth("Back") + 8, 20, "Back"));
    changelogSlot = new GuiSlotChangelog(this);
  }
View Full Code Here

    super(mainMenu);
  }

  public void initGui() {
    super.initGui();
    controlList.add(new GuiButton(1337, 10, height - 30, fontRenderer
        .getStringWidth("Update Manager") + 6, 20, "Update Manager"));
  }
View Full Code Here

    disclaimer = readDisclaimer(mod);
  }
 
  public void initGui(){
    controlList.clear();
    controlList.add(new GuiButton(0, width/2-50, height-60, 100, 20, "Download Anyway"));
    noDown = new GuiButton(1, width/2-50, height-90, 100, 20, "Don't Download");

    controlList.add(noDown);
    if(disclaimer.length < 1 || MathHelper.stringNullOrLengthZero(header = disclaimer[0]))
      actionPerformed(noDown);
    super.initGui();
View Full Code Here

TOP

Related Classes of net.minecraft.src.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.