mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 06:24:26 +00:00
Feature/refactoring (#85)
* Added some localization * Added some localization * Fix modid * Added some localization
This commit is contained in:
1 parent
b5a6919f7f
commit
0c15ee9943
35 files changed
+361
-189
No files matched your search
@@ -14,6 +14,7 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.inoculator.Inoculator;
|
||||
@@ -23,8 +24,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowSplicer extends WindowMachine {
|
||||
protected static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
protected static Texture progressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
protected static Texture progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
|
||||
public WindowSplicer(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 240, player, inventory, side);
|
||||
@@ -36,21 +37,42 @@ public class WindowSplicer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle("Splicer");
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
new ControlSplicerProgress(this, 84.0f, 32.0f, w() - 172.0f, 102.0f);
|
||||
CraftGUIUtil.horizontalGrid(x, 62.0f, new ControlSlotArray(this, 0, 0, 2, 1).create(Splicer.SLOT_SERUM_RESERVE), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(0));
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1).create(Splicer.SLOT_SERUM_EXPENDED);
|
||||
CraftGUIUtil.horizontalGrid(
|
||||
x,
|
||||
62.0f,
|
||||
new ControlSlotArray(this, 0, 0, 2, 1)
|
||||
.create(Splicer.SLOT_SERUM_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()),
|
||||
new ControlSlot(this, 0.0f, 0.0f)
|
||||
.assign(Splicer.SLOT_SERUM_VIAL)
|
||||
);
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1)
|
||||
.create(Splicer.SLOT_SERUM_EXPENDED);
|
||||
new ControlIconDisplay(this, x + 12 + 36 + 4, 86.0f, GUIIcon.ArrowUpLeft.getIcon());
|
||||
new ControlEnergyBar(this, 196, 64, 60, 16, Position.LEFT);
|
||||
new ControlErrorState(this, 218.0f, 86.0f);
|
||||
CraftGUIUtil.verticalGrid((w() - 72.0f) / 2.0f, 32.0f, TextJustification.MiddleCenter, 4.0f, new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.SLOT_RESERVE), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(9), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()), new ControlSlotArray(this, 0, 0, 4, 1).create(Inoculator.SLOT_FINISHED));
|
||||
CraftGUIUtil.verticalGrid(
|
||||
(w() - 72.0f) / 2.0f,
|
||||
32.0f,
|
||||
TextJustification.MiddleCenter,
|
||||
4.0f,
|
||||
new ControlSlotArray(this, 0, 0, 4, 1)
|
||||
.create(Inoculator.SLOT_RESERVE),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()),
|
||||
new ControlSlot(this, 0.0f, 0.0f)
|
||||
.assign(Splicer.SLOT_TARGET),
|
||||
new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowDown.getIcon()),
|
||||
new ControlSlotArray(this, 0, 0, 4, 1)
|
||||
.create(Inoculator.SLOT_FINISHED));
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Inoculator";
|
||||
return I18N.localise(Genetics.instance, "machine.advMachine.splicer");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,6 +82,6 @@ public class WindowSplicer extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "Inoculator";
|
||||
return getTitle();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user