use of net.minecraft.client.gui.GuiButtonImage in project Random-Things by lumien231.
the class GuiBlockDestabilizer method initGui.
@Override
public void initGui() {
super.initGui();
GuiBoolButton lazyButton = new GuiBoolButton(0, this.guiLeft + 7, this.guiTop + 7, 20, 20, new ResourceLocation("randomthings", "textures/gui/blockDestabilizer/lazy.png"), TileEntityBlockDestabilizer.class, "lazy", te);
this.buttonList.add(lazyButton);
GuiBoolButton fuzzyButton = new GuiBoolButton(1, this.guiLeft + 33, this.guiTop + 7, 20, 20, new ResourceLocation("randomthings", "textures/gui/blockDestabilizer/fuzzy.png"), TileEntityBlockDestabilizer.class, "fuzzy", te);
this.buttonList.add(fuzzyButton);
GuiButton resetButton = new GuiButtonImage(2, this.guiLeft + 58, this.guiTop + 7, 20, 20, 85, 0, 20, background);
this.buttonList.add(resetButton);
}
use of net.minecraft.client.gui.GuiButtonImage in project SpringFestival by TeamCovertDragon.
the class GuiContainerRedPacket method initGui.
@Override
public void initGui() {
super.initGui();
GuiButtonImage sendRedPacket = new GuiButtonImage(0, this.guiLeft + 17, this.guiTop + 13, 25, 15, 195, 0, 0, TEXTURE_BG);
buttonList.add(sendRedPacket);
GuiButtonToggle passcodeModeToggle = new GuiButtonToggle(1, this.guiLeft + 15, this.guiTop + 49, 14, 14, false) {
@Override
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) {
if (passcodeMode) {
super.drawButton(mc, mouseX, mouseY, partialTicks);
}
}
};
passcodeModeToggle.initTextureValues(195, 17, 0, 0, TEXTURE_BG);
buttonList.add(passcodeModeToggle);
this.receiver = new GuiTextField(2, this.fontRenderer, this.guiLeft + 46 + 4, this.guiTop + 13 + 3, 133, 15);
this.receiver.setTextColor(-1);
this.receiver.setDisabledTextColour(-1);
this.receiver.setEnableBackgroundDrawing(false);
this.receiver.setCanLoseFocus(true);
this.receiver.setEnabled(true);
this.message = new GuiTextField(3, this.fontRenderer, this.guiLeft + 17 + 4, this.guiTop + 31 + 3, 162, 15);
this.message.setTextColor(-1);
this.message.setEnableBackgroundDrawing(false);
this.message.setCanLoseFocus(true);
this.message.setEnabled(true);
NBTTagCompound data = Minecraft.getMinecraft().player.getHeldItemMainhand().getTagCompound();
if (data != null) {
this.receiver.setText(data.getString("receiver_name"));
this.message.setText(data.getString("message"));
}
}
use of net.minecraft.client.gui.GuiButtonImage in project BuildCraft by BuildCraft.
the class GuiAutoCraftItems method initGui.
@Override
public void initGui() {
super.initGui();
widthTooNarrow = this.width < SIZE_X + 176;
if (recipeBook != null) {
InventoryCrafting invCraft = container.tile.getWorkbenchCrafting();
recipeBook.func_194303_a(width, height, mc, widthTooNarrow, invCraft);
guiLeft = recipeBook.updateScreenPosition(widthTooNarrow, width, xSize);
recipeButton = new GuiButtonImage(10, guiLeft + 5, height / 2 - 66, 20, 18, 0, 168, 19, VANILLA_CRAFTING_TABLE);
buttonList.add(this.recipeButton);
}
}
use of net.minecraft.client.gui.GuiButtonImage in project BuildCraft by BuildCraft.
the class GuiAdvancedCraftingTable method initGui.
@Override
public void initGui() {
super.initGui();
widthTooNarrow = this.width < SIZE_X + 176;
if (recipeBook != null) {
InventoryCrafting invCraft = container.tile.getWorkbenchCrafting();
recipeBook.func_194303_a(width, height, mc, widthTooNarrow, invCraft);
guiLeft = recipeBook.updateScreenPosition(widthTooNarrow, width, xSize);
recipeButton = new GuiButtonImage(10, guiLeft + 5, height / 2 - 90, 20, 18, 0, 168, 19, VANILLA_CRAFTING_TABLE);
buttonList.add(this.recipeButton);
}
}
use of net.minecraft.client.gui.GuiButtonImage in project Nutrition by WesCook.
the class EventNutritionButton method guiOpen.
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void guiOpen(GuiScreenEvent.InitGuiEvent.Post event) {
// If any inventory except player inventory is opened, get out
GuiScreen gui = event.getGui();
if (!(gui instanceof GuiInventory))
return;
// Get button position
int[] pos = calculateButtonPosition(gui);
int x = pos[0];
int y = pos[1];
// Create button
buttonNutrition = new GuiButtonImage(NUTRITION_ID, x, y, 20, 18, 14, 0, 19, NUTRITION_ICON);
event.getButtonList().add(buttonNutrition);
}
Aggregations