コード例 #1
0
  @Override
  public void initGui() {
    super.initGui();

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

    String file = "Textures/GUIs/Handbook/buttons.png";
    if (recipes.size() > 1) {
      buttonList.add(
          new CustomSoundImagedGuiButton(
              0, j + 205, k - 3, 10, 12, 183, 6, file, ChromatiCraft.class, this));
      buttonList.add(
          new CustomSoundImagedGuiButton(
              1, j + 215, k - 3, 10, 12, 193, 6, file, ChromatiCraft.class, this));
    }

    if (subpage == 0 && this.getItemCounts().size() > 10) {
      buttonList.add(
          new CustomSoundImagedGuiButton(
              2, j + 205, k + 50, 12, 10, 100, 6, file, ChromatiCraft.class, this));
      buttonList.add(
          new CustomSoundImagedGuiButton(
              3, j + 205, k + 60, 12, 10, 112, 6, file, ChromatiCraft.class, this));
    }
  }
コード例 #2
0
  @Override
  public void initGui() {
    super.initGui();
    render.resetRotation();
    int j = (width - xSize) / 2;
    int k = (height - ySize) / 2;

    buttonList.add(new CustomSoundGuiButton(0, j + 185, k - 2, 20, 20, "3D", this));
    buttonList.add(new CustomSoundGuiButton(1, j + 205, k - 2, 20, 20, "2D", this));
    buttonList.add(
        new CustomSoundGuiButton(4, mode == 1 ? j + 125 : j + 165, k - 2, 20, 20, "N#", this));

    if (mode == 1) {
      buttonList.add(new CustomSoundGuiButton(2, j + 165, k - 2, 20, 20, "+", this));
      buttonList.add(new CustomSoundGuiButton(3, j + 145, k - 2, 20, 20, "-", this));
    }
  }
コード例 #3
0
  @Override
  public void initGui() {
    super.initGui();

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

    String file = "Textures/GUIs/Handbook/buttons.png";

    if (page == ChromaResearch.USINGRUNES && subpage == 1 && view.getSizeY() > 1) {
      buttonList.add(
          new CustomSoundImagedGuiButton(
              3, j + 230, k + 75, 12, 10, 100, 6, file, ChromatiCraft.class, this));
      buttonList.add(
          new CustomSoundImagedGuiButton(
              2, j + 230, k + 85, 12, 10, 112, 6, file, ChromatiCraft.class, this));
    }
  }