use of mekanism.common.network.to_server.PacketGuiButtonPress in project Mekanism by mekanism.
the class GuiQIOTileFrequencySelect method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiFrequencySelector<>(this, 17));
addButton(new MekanismImageButton(this, 6, 6, 14, getButtonLocation("back"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedTileButton.BACK_BUTTON, tile))));
}
use of mekanism.common.network.to_server.PacketGuiButtonPress in project Mekanism by mekanism.
the class GuiRobit method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiSecurityTab(this, robit, 120));
addButton(GuiSideHolder.create(this, 176, 6, 106, false, false, SpecialColors.TAB_ROBIT_MENU));
addButton(new MekanismImageButton(this, 179, 10, 18, getButtonLocation("main"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_MAIN, robit)), getOnHover(MekanismLang.ROBIT)));
addButton(new MekanismImageButton(this, 179, 30, 18, getButtonLocation("crafting"), () -> {
if (shouldOpenGui(RobitGuiType.CRAFTING)) {
Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_CRAFTING, robit));
}
}, getOnHover(MekanismLang.ROBIT_CRAFTING)));
addButton(new MekanismImageButton(this, 179, 50, 18, getButtonLocation("inventory"), () -> {
if (shouldOpenGui(RobitGuiType.INVENTORY)) {
Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_INVENTORY, robit));
}
}, getOnHover(MekanismLang.ROBIT_INVENTORY)));
addButton(new MekanismImageButton(this, 179, 70, 18, getButtonLocation("smelting"), () -> {
if (shouldOpenGui(RobitGuiType.SMELTING)) {
Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_SMELTING, robit));
}
}, getOnHover(MekanismLang.ROBIT_SMELTING)));
addButton(new MekanismImageButton(this, 179, 90, 18, getButtonLocation("repair"), () -> {
if (shouldOpenGui(RobitGuiType.REPAIR)) {
Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_REPAIR, robit));
}
}, getOnHover(MekanismLang.ROBIT_REPAIR)));
}
Aggregations