Search in sources :

Example 1 with GuiPriceBar

use of kingdoms.api.gui.GuiPriceBar in project Tale-of-Kingdoms by Ivasik78.

the class GuiHunter method initGui.

@Override
public void initGui() {
    this.buttonList.clear();
    this.buttonList.add(!HunterHandler.INSTANCE.getHunter() ? new GuiButton(1, this.width / 2 + 110, 140, 100, 20, I18n.format("gui.guildMaster.sigh")) : new GuiButton(1, this.width / 2 + 110, 140, 100, 20, I18n.format("gui.guildMaster.discard")));
    this.buttonList.add(new GuiButton(2, this.width / 2 + 110, 160, 100, 20, I18n.format("gui.guildMaster.hire")));
    this.buttonList.add(new GuiButton(4, this.width / 2 + 110, 180, 100, 20, I18n.format("gui.guildMaster.fix")));
    this.buttonList.add(new GuiButton(5, this.width / 2 + 110, 200, 100, 20, I18n.format("gui.guildMaster.retire")));
    this.buttonList.add(new GuiButton(3, this.width / 2 + 110, 220, 100, 20, I18n.format("gui.exit")));
    this.worthness = new GuiPriceBar(0, this.width / 2 + 110, 120, 125, 12, 1.0F, "red");
    this.worthness.setBar(playerProvider.getGlory() / 10000.0F);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiPriceBar(kingdoms.api.gui.GuiPriceBar)

Example 2 with GuiPriceBar

use of kingdoms.api.gui.GuiPriceBar in project Tale-of-Kingdoms by Ivasik78.

the class GuiLumber method initGui.

@Override
public void initGui() {
    this.bar = new GuiPriceBar(0, this.width / 2 - 45, 40, 90, 12, 1.0F, "red");
    this.bar.setBar((float) ResourcesHandler.INSTANCE.getWoodPool() / 320.0F);
    this.buttonList.add(new GuiButton(1, this.width / 2 - 45, 77, 90, 20, I18n.format("gui.foreman.takeStack")));
    this.buttonList.add(new GuiButton(2, this.width / 2 - 45, 100, 90, 20, I18n.format("gui.foreman.buyWorker")));
    this.buttonList.add(new GuiButton(3, this.width / 2 - 45, 123, 90, 20, I18n.format("gui.cancel")));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiPriceBar(kingdoms.api.gui.GuiPriceBar)

Example 3 with GuiPriceBar

use of kingdoms.api.gui.GuiPriceBar in project Tale-of-Kingdoms by Ivasik78.

the class GuiQuarry method initGui.

@Override
public void initGui() {
    this.bar = new GuiPriceBar(0, this.width / 2 - 100, 40, 90, 12, 1.0F, "red");
    this.bar.setBar((float) ResourcesHandler.INSTANCE.getCobblePool() / 320.0F);
    this.buttonList.add(new GuiButton(1, this.width / 2 - 45, 77, 90, 20, I18n.format("gui.foreman.takeStack")));
    this.buttonList.add(new GuiButton(2, this.width / 2 - 45, 100, 90, 20, I18n.format("gui.foreman.buyWorker")));
    this.buttonList.add(new GuiButton(3, this.width / 2 - 45, 123, 90, 20, I18n.format("gui.cancel")));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiPriceBar(kingdoms.api.gui.GuiPriceBar)

Example 4 with GuiPriceBar

use of kingdoms.api.gui.GuiPriceBar in project Tale-of-Kingdoms by Ivasik78.

the class GuiReinforcementPool method initGui.

@Override
public void initGui() {
    this.buttonList.clear();
    this.knightPool = new GuiPriceBar(0, this.width / 2 - 100, 40, 90, 12, 1.0F, "red");
    this.knightPool.setBar(this.soldierNumber / 80.0F);
}
Also used : GuiPriceBar(kingdoms.api.gui.GuiPriceBar)

Example 5 with GuiPriceBar

use of kingdoms.api.gui.GuiPriceBar in project Tale-of-Kingdoms by Ivasik78.

the class GuiStockList method initGui.

public void initGui() {
    this.buttonList.clear();
    this.loadbar[0] = new GuiPriceBar(0, this.width / 2 - 100, 43, 90, 12, 1.0F, "red");
    this.loadbar[1] = new GuiPriceBar(0, this.width / 2 - 100, 63, 90, 12, 1.0F, "red");
    this.loadbar[2] = new GuiPriceBar(0, this.width / 2 - 100, 83, 90, 12, 1.0F, "red");
    this.loadbar[3] = new GuiPriceBar(0, this.width / 2 - 100, 103, 90, 12, 1.0F, "red");
    this.loadbar[4] = new GuiPriceBar(0, this.width / 2 - 100, 123, 90, 12, 1.0F, "red");
    this.loadbar[5] = new GuiPriceBar(0, this.width / 2 - 100, 143, 90, 12, 1.0F, "red");
    this.loadbar[6] = new GuiPriceBar(0, this.width / 2 - 100, 163, 90, 12, 1.0F, "red");
    this.loadbar[7] = new GuiPriceBar(0, this.width / 2 - 100, 183, 90, 12, 1.0F, "red");
    /*this.loadbar[0].setBar(GoldKeeper.INSTANCE.flint / 200.0F);
      this.loadbar[1].setBar(GoldKeeper.INSTANCE.clay / 200.0F);
      this.loadbar[2].setBar(GoldKeeper.INSTANCE.iron / 200.0F);
      this.loadbar[3].setBar(GoldKeeper.INSTANCE.diamond / 200.0F);
      this.loadbar[4].setBar(GoldKeeper.INSTANCE.fish / 200.0F);
      this.loadbar[5].setBar(GoldKeeper.INSTANCE.apple / 200.0F);
      this.loadbar[6].setBar(GoldKeeper.INSTANCE.string / 200.0F);
      this.loadbar[7].setBar(GoldKeeper.INSTANCE.feather / 200.0F);*/
    String s7;
    /*if(this.item[1] != null) {
         s7 = this.item[1].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[1], this, 8, this.width / 2 + 20, 40, 90, 20, s7));
      }

      if(this.item[2] != null) {
         s7 = this.item[2].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[2], this, 9, this.width / 2 + 20, 60, 90, 20, s7));
      }

      if(this.item[3] != null) {
         s7 = this.item[3].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[3], this, 10, this.width / 2 + 20, 80, 90, 20, s7));
      }

      if(this.item[4] != null) {
         s7 = this.item[4].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[4], this, 11, this.width / 2 + 20, 100, 90, 20, s7));
      }

      if(this.item[5] != null) {
         s7 = this.item[5].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[5], this, 12, this.width / 2 + 20, 120, 90, 20, s7));
      }

      if(this.item[6] != null) {
         s7 = this.item[6].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[6], this, 13, this.width / 2 + 20, 140, 90, 20, s7));
      }

      if(this.item[7] != null) {
         s7 = this.item[7].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[7], this, 14, this.width / 2 + 20, 160, 90, 20, s7));
      }

      if(this.item[8] != null) {
         s7 = this.item[8].getUnlocalizedName() + ".name";
         s7 = this.st.translateKey(s7);
         this.buttonList.add(new GuiButtonShop(this.item[8], this, 15, this.width / 2 + 20, 180, 90, 20, s7));
      }*/
    this.buttonList.add(new GuiButton(18, this.width / 2 + 130, 160, 80, 20, "Buy Item"));
    this.buttonList.add(new GuiButton(19, this.width / 2 + 130, 220, 80, 20, "Exit"));
    this.buttonList.add(new GuiButton(21, this.width / 2 + 130, 200, 80, 20, "Buy 16 Items"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiPriceBar(kingdoms.api.gui.GuiPriceBar)

Aggregations

GuiPriceBar (kingdoms.api.gui.GuiPriceBar)7 GuiButton (net.minecraft.client.gui.GuiButton)6