use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementDropdown in project Galacticraft by micdoodle8.
the class GuiLaunchControllerAdvanced method onSelectionChanged.
@Override
public void onSelectionChanged(GuiElementDropdown dropdown, int selection) {
if (dropdown.equals(this.dropdownTest)) {
this.launchController.launchDropdownSelection = selection;
GalacticraftCore.packetPipeline.sendToServer(new PacketSimpleMars(EnumSimplePacketMars.S_UPDATE_ADVANCED_GUI, GCCoreUtil.getDimensionID(mc.theWorld), new Object[] { 1, this.launchController.getPos(), this.launchController.launchDropdownSelection }));
}
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementDropdown in project Galacticraft by micdoodle8.
the class GuiLaunchControllerAdvanced 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.enablePadRemovalButton = new GuiElementCheckbox(1, this, this.width / 2 - 61, yTop + 20, GCCoreUtil.translate("gui.message.remove_pad.name"));
this.launchWhenCheckbox = new GuiElementCheckbox(2, this, this.width / 2 - 61, yTop + 38, GCCoreUtil.translate("gui.message.launch_when.name") + ": ");
this.dropdownTest = new GuiElementDropdown(3, this, xLeft + 52, yTop + 52, EnumAutoLaunch.CARGO_IS_UNLOADED.getTitle(), EnumAutoLaunch.CARGO_IS_FULL.getTitle(), EnumAutoLaunch.ROCKET_IS_FUELED.getTitle(), EnumAutoLaunch.INSTANT.getTitle(), EnumAutoLaunch.TIME_10_SECONDS.getTitle(), EnumAutoLaunch.TIME_30_SECONDS.getTitle(), EnumAutoLaunch.TIME_1_MINUTE.getTitle(), EnumAutoLaunch.REDSTONE_SIGNAL.getTitle());
this.closeAdvancedConfig = new GuiButton(4, xLeft + 5, yTop + 5, 20, 20, "<");
this.buttonList.add(this.enablePadRemovalButton);
this.buttonList.add(this.launchWhenCheckbox);
this.buttonList.add(this.dropdownTest);
this.buttonList.add(this.closeAdvancedConfig);
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.2"));
this.infoRegions.add(new GuiElementInfoRegion(xLeft + 27, yTop + 20, 13, 13, batterySlotDesc, this.width, this.height, this));
batterySlotDesc = new ArrayList<String>();
batterySlotDesc.addAll(GCCoreUtil.translateWithSplit("gui.launch_controller.desc.3"));
this.infoRegions.add(new GuiElementInfoRegion(xLeft + 52, yTop + 53, 99, 13, batterySlotDesc, this.width, this.height, this));
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementDropdown in project Galacticraft by micdoodle8.
the class GuiAirLockController method onSelectionChanged.
@Override
public void onSelectionChanged(GuiElementDropdown dropdown, int selection) {
if (dropdown.equals(this.dropdownPlayerDistance)) {
this.controller.playerDistanceSelection = selection;
GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_ON_ADVANCED_GUI_CLICKED_INT, GCCoreUtil.getDimensionID(mc.theWorld), new Object[] { 2, this.controller.getPos(), this.controller.playerDistanceSelection }));
}
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementDropdown in project Galacticraft by micdoodle8.
the class GuiAirLockController 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.checkboxRedstoneSignal = new GuiElementCheckbox(0, this, this.width / 2 - 84, var6 + 18, GCCoreUtil.translate("gui.checkbox.redstone_signal.name"));
this.checkboxPlayerDistance = new GuiElementCheckbox(1, this, this.width / 2 - 84, var6 + 33, GCCoreUtil.translate("gui.checkbox.player_within.name") + ": ");
String[] dropboxStrings = { GCCoreUtil.translate("gui.dropbox.player_distance.name.0"), GCCoreUtil.translate("gui.dropbox.player_distance.name.1"), GCCoreUtil.translate("gui.dropbox.player_distance.name.2"), GCCoreUtil.translate("gui.dropbox.player_distance.name.3") };
this.dropdownPlayerDistance = new GuiElementDropdown(2, this, var5 + 99, var6 + 32, dropboxStrings);
this.checkboxOpenForPlayer = new GuiElementCheckbox(3, this, this.width / 2 - 68, var6 + 49, GCCoreUtil.translate("gui.checkbox.player_name.name") + ": ");
this.textBoxPlayerToOpenFor = new GuiElementTextBox(4, this, this.width / 2 - 61, var6 + 64, 110, 15, "", false, 16, false);
this.checkboxInvertSelection = new GuiElementCheckbox(5, this, this.width / 2 - 84, var6 + 80, GCCoreUtil.translate("gui.checkbox.invert.name"));
this.checkboxHorizontalMode = new GuiElementCheckbox(6, this, this.width / 2 - 84, var6 + 96, GCCoreUtil.translate("gui.checkbox.horizontal.name"));
this.buttonList.add(this.checkboxRedstoneSignal);
this.buttonList.add(this.checkboxPlayerDistance);
this.buttonList.add(this.dropdownPlayerDistance);
this.buttonList.add(this.checkboxOpenForPlayer);
this.buttonList.add(this.textBoxPlayerToOpenFor);
this.buttonList.add(this.checkboxInvertSelection);
this.buttonList.add(this.checkboxHorizontalMode);
}
Aggregations