Exemplo n.º 1
0
 /** Adds the buttons (and other controls) to the screen in question. */
 public void initGui() {
   StringTranslate var1 = StringTranslate.getInstance();
   this.buttonList.add(
       new GuiFancyButton(
           5,
           this.width / 2 - 74,
           this.height - 48,
           var1.translateKey("texturePack.openFolder"),
           3));
   this.buttonList.add(
       new GuiFancyButton(
           6, this.width / 2 + 74, this.height - 48, var1.translateKey("gui.done"), 3));
   this.mc.texturePackList.updateAvaliableTexturePacks();
   this.fileLocation = (new File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath();
   this.guiTexturePackSlot = new GuiFancyTexturePackSlot(this);
   this.guiTexturePackSlot.registerScrollButtons(this.buttonList, 7, 8);
   bg = new GuiFancyRotatingBackground(mc, width, height, zLevel);
 }
Exemplo n.º 2
0
  /** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    bg.RenderBackground(par1, par2, par3);
    this.guiTexturePackSlot.drawScreen(par1, par2, par3);

    if (this.refreshTimer <= 0) {
      this.mc.texturePackList.updateAvaliableTexturePacks();
      this.refreshTimer += 20;
    }

    StringTranslate var4 = StringTranslate.getInstance();
    this.drawCenteredString(
        this.fontRenderer, var4.translateKey("texturePack.title"), this.width / 2, 16, 16777215);
    this.drawCenteredString(
        this.fontRenderer,
        var4.translateKey("texturePack.folderInfo"),
        this.width / 2 - 77,
        this.height - 26,
        8421504);
    super.drawScreen(par1, par2, par3);
  }