コード例 #1
0
  @Override
  protected void drawGuiContainerForegroundLayer(int a, int b) {
    int j = (width - xSize) / 2;
    int k = (height - ySize) / 2;

    super.drawGuiContainerForegroundLayer(a, b);

    if (ReikaGuiAPI.instance.isMouseInBox(j + 138, j + 145, k + 17, k + 68)) {
      int mx = ReikaGuiAPI.instance.getMouseRealX();
      int my = ReikaGuiAPI.instance.getMouseRealY();
      ReikaGuiAPI.instance.drawTooltipAt(
          fontRenderer, String.format("%d/%d", fct.getLevel(), fct.CAPACITY), mx - j, my - k);
    }
  }
コード例 #2
0
  /** Draw the background layer for the GuiContainer (everything behind the items) */
  @Override
  protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    super.drawGuiContainerBackgroundLayer(par1, par2, par3);

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

    int i1 = fct.getStorageScaled(17);
    int i2 = fct.getFuelScaled(50);
    int i3 = fct.getMixScaled(30);
    if (i3 > 30) i3 = 30;
    this.drawTexturedModalRect(j + 64, k + 25, 177, 1, i3, 38);
    this.drawTexturedModalRect(j + 139, k + 68 - i2, 177, 95 - i2, 6, i2);
  }
コード例 #3
0
ファイル: GuiExtractor.java プロジェクト: ruki260/RotaryCraft
  /** Draw the background layer for the GuiContainer (everything behind the items) */
  @Override
  protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
    super.drawGuiContainerBackgroundLayer(par1, par2, par3);

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

    int i1 = ext.getCookProgressScaled(32, 0);
    int i2 = ext.getCookProgressScaled(28, 1);
    int i3 = ext.getCookProgressScaled(28, 2);
    int i4 = ext.getCookProgressScaled(32, 3);
    this.drawTexturedModalRect(j + 29, k + 34, 176, 48, 10, i1);
    this.drawTexturedModalRect(j + 63, k + 35, 186, 48, 14, i2);
    this.drawTexturedModalRect(j + 99, k + 35, 200, 48, 14, i3);
    this.drawTexturedModalRect(j + 133, k + 49 - i4, 176, 79 - i4, 17, i4);
  }