aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
commit869c206c4fcc8001bd2e1d66f704290331813835 (patch)
tree96735ce8fe4665e2759c3374221d6f06f4527df2 /src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
parentec2c72827f01dd4bb2174137f1ab162f9ddaab62 (diff)
downloadGT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.gz
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.bz2
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.zip
Initial Commit
Diffstat (limited to 'src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java')
-rw-r--r--src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java116
1 files changed, 116 insertions, 0 deletions
diff --git a/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java b/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
new file mode 100644
index 0000000000..9e2f580b53
--- /dev/null
+++ b/src/Java/binnie/craftgui/genetics/machine/WindowSequencer.java
@@ -0,0 +1,116 @@
+package binnie.craftgui.genetics.machine;
+
+import binnie.core.AbstractMod;
+import binnie.craftgui.controls.ControlText;
+import binnie.craftgui.core.IWidget;
+import binnie.craftgui.core.geometry.CraftGUIUtil;
+import binnie.craftgui.core.geometry.IArea;
+import binnie.craftgui.core.geometry.Position;
+import binnie.craftgui.core.geometry.TextJustification;
+import binnie.craftgui.minecraft.GUIIcon;
+import binnie.craftgui.minecraft.Window;
+import binnie.craftgui.minecraft.control.ControlEnergyBar;
+import binnie.craftgui.minecraft.control.ControlErrorState;
+import binnie.craftgui.minecraft.control.ControlIconDisplay;
+import binnie.craftgui.minecraft.control.ControlPlayerInventory;
+import binnie.craftgui.minecraft.control.ControlSlot;
+import binnie.craftgui.minecraft.control.ControlSlotArray;
+import binnie.craftgui.minecraft.control.ControlSlotCharge;
+import binnie.craftgui.resource.Texture;
+import binnie.craftgui.resource.minecraft.StandardTexture;
+import binnie.extrabees.core.ExtraBeeTexture;
+import binnie.genetics.Genetics;
+import binnie.genetics.machine.Sequencer;
+import cpw.mods.fml.relauncher.Side;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.nbt.NBTTagCompound;
+
+public class WindowSequencer
+ extends WindowMachine
+{
+ public static Window create(EntityPlayer player, IInventory inventory, Side side)
+ {
+ return new WindowSequencer(player, inventory, side);
+ }
+
+ public WindowSequencer(EntityPlayer player, IInventory inventory, Side side)
+ {
+ super(226, 224, player, inventory, side);
+ }
+
+ static Texture ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
+ static Texture Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
+ ControlText slotText;
+
+ public void recieveGuiNBT(Side side, EntityPlayer player, String name, NBTTagCompound action)
+ {
+ if ((side == Side.CLIENT) && (name.equals("username"))) {
+ this.slotText.setValue("§8Genes will be sequenced by " + action.getString("username"));
+ }
+ super.recieveGuiNBT(side, player, name, action);
+ }
+
+ public void initialiseClient()
+ {
+ setTitle("Sequencer");
+
+
+ int x = 16;
+ int y = 32;
+
+
+
+
+ CraftGUIUtil.horizontalGrid(x, y, TextJustification.MiddleCenter, 2.0F, new IWidget[] { new ControlSlotArray(this, 0, 0, 2, 2).create(Sequencer.slotReserve), new ControlIconDisplay(this, 0.0F, 0.0F, GUIIcon.ArrowRight.getIcon()), new ControlSequencerProgress(this, 0, 0), new ControlIconDisplay(this, 0.0F, 0.0F, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0F, 0.0F).assign(6) });
+
+
+
+
+
+
+
+
+ ControlSlot slotTarget = new ControlSlot(this, x + 96, y + 16);
+ slotTarget.assign(5);
+
+ x = 34;
+ y = 92;
+
+ this.slotText = new ControlText(this, new IArea(0.0F, y, w(), 12.0F), "§8Userless. Will not save sequences", TextJustification.MiddleCenter);
+
+
+
+ y += 20;
+
+ ControlSlot slotDye = new ControlSlot(this, x, y);
+ slotDye.assign(0);
+ x += 20;
+ new ControlSlotCharge(this, x, y, 0).setColour(16750848);
+
+ x += 32;
+ new ControlEnergyBar(this, x, y, 60, 16, Position.Left);
+
+ x += 92;
+ ControlErrorState errorState = new ControlErrorState(this, x, y + 1);
+
+
+
+ new ControlPlayerInventory(this);
+ }
+
+ public String getTitle()
+ {
+ return "Incubator";
+ }
+
+ protected AbstractMod getMod()
+ {
+ return Genetics.instance;
+ }
+
+ protected String getName()
+ {
+ return "Sequencer";
+ }
+}