Search in sources :

Example 6 with GuiElementTextBox

use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementTextBox in project Galacticraft by micdoodle8.

the class GuiShortRangeTelepad method initGui.

@Override
public void initGui() {
    super.initGui();
    this.buttonList.clear();
    final int var5 = (this.width - this.xSize) / 2;
    final int var6 = (this.height - this.ySize) / 2;
    this.enableControllerButton = new GuiButton(0, var5 + 70 + 124 - 72, var6 + 16, 48, 20, GCCoreUtil.translate("gui.button.enable.name"));
    this.address = new GuiElementTextBox(1, this, var5 + 66, var6 + 16, 48, 20, "", true, 6, false);
    this.targetAddress = new GuiElementTextBox(2, this, var5 + 122, var6 + 16 + 22, 48, 20, "", true, 6, false);
    this.buttonList.add(this.enableControllerButton);
    this.buttonList.add(this.address);
    this.buttonList.add(this.targetAddress);
    this.electricInfoRegion.tooltipStrings = new ArrayList<String>();
    this.electricInfoRegion.xPosition = (this.width - this.xSize) / 2 + 98;
    this.electricInfoRegion.yPosition = (this.height - this.ySize) / 2 + 113;
    this.electricInfoRegion.parentWidth = this.width;
    this.electricInfoRegion.parentHeight = this.height;
    this.infoRegions.add(this.electricInfoRegion);
    List<String> batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
    batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
    this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 151, (this.height - this.ySize) / 2 + 104, 18, 18, batterySlotDesc, this.width, this.height, this));
    batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.telepad.desc.0"));
    this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 5, (this.height - this.ySize) / 2 + 20, 59, 13, batterySlotDesc, this.width, this.height, this));
    batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.telepad.desc.1"));
    this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 5, (this.height - this.ySize) / 2 + 42, 117, 13, batterySlotDesc, this.width, this.height, this));
}
Also used : GuiElementInfoRegion(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion) GuiButton(net.minecraft.client.gui.GuiButton) GuiElementTextBox(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementTextBox) ArrayList(java.util.ArrayList)

Example 7 with GuiElementTextBox

use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementTextBox in project Galacticraft by micdoodle8.

the class GuiLaunchController method initGui.

@Override
public void initGui() {
    super.initGui();
    this.buttonList.clear();
    final int xLeft = (this.width - this.xSize) / 2;
    final int yTop = (this.height - this.ySize) / 2;
    this.enableControllerButton = new GuiButton(0, xLeft + 70 + 124 - 72, yTop + 16, 48, 20, GCCoreUtil.translate("gui.button.enable.name"));
    this.frequency = new GuiElementTextBox(4, this, xLeft + 66, yTop + 16, 48, 20, "", true, 6, false);
    this.destinationFrequency = new GuiElementTextBox(5, this, xLeft + 45, yTop + 16 + 22, 48, 20, "", true, 6, false);
    this.hideDestinationFrequency = new GuiButton(6, xLeft + 95, yTop + 16 + 22, 39, 20, GCCoreUtil.translate("gui.button.hide_dest.name"));
    this.openAdvancedConfig = new GuiButton(7, xLeft + 48, yTop + 62, 80, 20, GCCoreUtil.translate("gui.launch_controller.advanced") + "...");
    this.buttonList.add(this.enableControllerButton);
    this.buttonList.add(this.frequency);
    this.buttonList.add(this.destinationFrequency);
    this.buttonList.add(this.hideDestinationFrequency);
    this.buttonList.add(this.openAdvancedConfig);
    this.electricInfoRegion.tooltipStrings = new ArrayList<String>();
    this.electricInfoRegion.xPosition = xLeft + 98;
    this.electricInfoRegion.yPosition = yTop + 113;
    this.electricInfoRegion.parentWidth = this.width;
    this.electricInfoRegion.parentHeight = this.height;
    this.infoRegions.add(this.electricInfoRegion);
    List<String> batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
    batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
    this.infoRegions.add(new GuiElementInfoRegion(xLeft + 151, yTop + 104, 18, 18, batterySlotDesc, this.width, this.height, this));
    batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.launch_controller.desc.0"));
    this.infoRegions.add(new GuiElementInfoRegion(xLeft + 5, yTop + 20, 109, 13, batterySlotDesc, this.width, this.height, this));
    batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.launch_controller.desc.1"));
    this.infoRegions.add(new GuiElementInfoRegion(xLeft + 5, yTop + 42, 87, 13, batterySlotDesc, this.width, this.height, this));
    batterySlotDesc = new ArrayList<String>();
    batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.launch_controller.desc.4"));
    this.infoRegions.add(new GuiElementInfoRegion(xLeft + 95, yTop + 38, 38, 20, batterySlotDesc, this.width, this.height, this));
}
Also used : GuiElementInfoRegion(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion) GuiButton(net.minecraft.client.gui.GuiButton) GuiElementTextBox(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementTextBox) ArrayList(java.util.ArrayList)

Aggregations

GuiElementTextBox (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementTextBox)3 ArrayList (java.util.ArrayList)2 GuiElementInfoRegion (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion)2 GuiButton (net.minecraft.client.gui.GuiButton)2 Vector2 (micdoodle8.mods.galacticraft.api.vector.Vector2)1 Vector3 (micdoodle8.mods.galacticraft.api.vector.Vector3)1 GuiElementCheckbox (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox)1 GuiElementDropdown (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementDropdown)1 PacketSimple (micdoodle8.mods.galacticraft.core.network.PacketSimple)1 PacketSimpleAsteroids (micdoodle8.mods.galacticraft.planets.asteroids.network.PacketSimpleAsteroids)1 PacketSimpleMars (micdoodle8.mods.galacticraft.planets.mars.network.PacketSimpleMars)1