use of net.minecraft.client.gui.GuiButton in project Guide-API by TeamAmeriFrance.
the class GuiHome method drawScreen.
@Override
public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {
Minecraft.getMinecraft().getTextureManager().bindTexture(pageTexture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
Minecraft.getMinecraft().getTextureManager().bindTexture(outlineTexture);
drawTexturedModalRectWithColor(guiLeft, guiTop, 0, 0, xSize, ySize, book.getColor());
drawCenteredString(fontRenderer, book.getLocalizedWelcomeMessage().replace("\\n", "\n").replace("&", "ยง"), guiLeft + xSize / 2 + 1, guiTop + 15, 0);
categoryPage = MathHelper.clamp(categoryPage, 0, categoryWrapperMap.size() - 1);
for (CategoryWrapper wrapper : this.categoryWrapperMap.get(categoryPage)) if (wrapper.canPlayerSee())
wrapper.draw(mouseX, mouseY, this);
for (CategoryWrapper wrapper : this.categoryWrapperMap.get(categoryPage)) if (wrapper.canPlayerSee())
wrapper.drawExtras(mouseX, mouseY, this);
drawCenteredString(fontRenderer, String.format("%d/%d", categoryPage + 1, categoryWrapperMap.asMap().size()), guiLeft + xSize / 2, guiTop + 5 * ySize / 6, 0);
drawCenteredStringWithShadow(fontRenderer, book.getLocalizedBookTitle(), guiLeft + xSize / 2, guiTop - 10, Color.WHITE.getRGB());
buttonPrev.visible = categoryPage != 0;
buttonNext.visible = categoryPage != categoryWrapperMap.asMap().size() - 1 && !categoryWrapperMap.asMap().isEmpty();
for (GuiButton button : this.buttonList) button.drawButton(this.mc, mouseX, mouseY);
}
use of net.minecraft.client.gui.GuiButton in project Railcraft by Railcraft.
the class GuiDetectorTrain method initGui.
@Override
public void initGui() {
buttonList.clear();
int w = (width - xSize) / 2;
int h = (height - ySize) / 2;
buttonList.add(new GuiButton(0, w + 13, h + 50, 30, 20, "-10"));
buttonList.add(new GuiButton(1, w + 53, h + 50, 30, 20, "-1"));
buttonList.add(new GuiButton(2, w + 93, h + 50, 30, 20, "+1"));
buttonList.add(new GuiButton(3, w + 133, h + 50, 30, 20, "+10"));
}
use of net.minecraft.client.gui.GuiButton in project Railcraft by Railcraft.
the class GuiTrackLauncher method initGui.
@Override
public void initGui() {
buttonList.clear();
int w = (width - xSize) / 2;
int h = (height - ySize) / 2;
buttonList.add(new GuiButton(0, w + 13, h + 50, 30, 20, "-10"));
buttonList.add(new GuiButton(1, w + 53, h + 50, 30, 20, "-1"));
buttonList.add(new GuiButton(2, w + 93, h + 50, 30, 20, "+1"));
buttonList.add(new GuiButton(3, w + 133, h + 50, 30, 20, "+10"));
}
use of net.minecraft.client.gui.GuiButton in project ICBM-Classic by BuiltBrokenModding.
the class GuiEMPTower method initGui.
/** Adds the buttons (and other controls) to the screen in question. */
@Override
public void initGui() {
super.initGui();
this.buttonList.clear();
this.buttonList.add(new GuiButton(0, this.width / 2 - 77, this.height / 2 - 10, 50, 20, LanguageUtility.getLocal("gui.empTower.missiles")));
this.buttonList.add(new GuiButton(1, this.width / 2 - 25, this.height / 2 - 10, 65, 20, LanguageUtility.getLocal("gui.empTower.elec")));
this.buttonList.add(new GuiButton(2, this.width / 2 + 43, this.height / 2 - 10, 35, 20, LanguageUtility.getLocal("gui.empTower.both")));
this.textFieldBanJing = new GuiTextField(fontRendererObj, 72, 28, 30, 12);
this.textFieldBanJing.setMaxStringLength(3);
this.textFieldBanJing.setText(this.tileEntity.empRadius + "");
}
use of net.minecraft.client.gui.GuiButton in project Pearcel-Mod by MiningMark48.
the class GuiCatBlocks method initGui.
@Override
public void initGui() {
super.initGui();
buttonList.clear();
int offsetFromScreenLeft = (width - textureWidth) / 2;
buttonList.add(buttonNextPage = new ComponentNextPageButton(1, offsetFromScreenLeft + 120, 158, true));
buttonList.add(buttonPreviousPage = new ComponentNextPageButton(1, offsetFromScreenLeft + 38, 158, false));
buttonHome = new GuiButton(2, (width / 2) - 20, textureHeight, 40, 20, Translate.toLocal("gui.manual.button.home"));
buttonList.add(buttonHome);
for (GuiButton e : buttonList) {
e.visible = false;
}
}
Aggregations