Some work, need to fix somethings at a later date

This commit is contained in:
modmuss50 2015-06-18 21:10:26 +01:00
parent 45d0f36286
commit a38899184d
6 changed files with 52 additions and 23 deletions

View file

@ -6,10 +6,12 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import techreborn.client.container.ContainerIDSU;
import techreborn.client.gui.componets.TabIDConfig;
import techreborn.cofhLib.gui.GuiBase;
import techreborn.cofhLib.gui.element.ElementListBox;
import techreborn.cofhLib.gui.element.ElementTextField;
import techreborn.cofhLib.gui.element.ElementTextFieldLimited;
import techreborn.cofhLib.gui.element.listbox.IListBoxElement;
import techreborn.cofhLib.gui.element.listbox.ListBoxElementText;
import techreborn.packets.PacketHandler;
import techreborn.packets.PacketIdsu;
@ -18,6 +20,9 @@ import techreborn.tiles.idsu.IDSUManager;
import techreborn.tiles.idsu.TileIDSU;
import techreborn.util.LogHelper;
import java.util.LinkedList;
import java.util.List;
public class GuiIDSU extends GuiBase {
@ -25,12 +30,13 @@ public class GuiIDSU extends GuiBase {
ContainerIDSU containerIDSU;
ElementListBox listBox;
public static ElementListBox listBox = new ElementListBox(null, 10, 28, 80, 60);
ElementTextFieldLimited idFeild;
ElementTextField nameFeild;
public GuiIDSU(EntityPlayer player,
TileIDSU tileIDSU)
{
@ -58,25 +64,8 @@ public class GuiIDSU extends GuiBase {
this.buttonList.add(new GuiButton(3, k + 96, l + 8 + (22*3), 18, 20, "--"));
this.buttonList.add(new GuiButton(4, k + 40, l + 10, 10, 10, "+"));
listBox = new ElementListBox(this, 10, 28, 80, 60);
listBox.gui = this;
if(idsu.getWorldObj() != null){
for(World world : ClientSideIDSUManager.CLIENT.worldData.keySet()){
// System.out.println(world.n + ":" + idsu.getWorldObj().getProviderName());
//if(world.getProviderName().equals(idsu.getWorldObj().getProviderName())){
IDSUManager.IDSUWorldSaveData saveData = ClientSideIDSUManager.CLIENT.getWorldDataFormWorld(world);
for(Integer id : saveData.idsuValues.keySet()){
IDSUManager.IDSUValueSaveData valueSaveData = saveData.idsuValues.get(id);
if(valueSaveData.name != ""){
listBox.add(new ListBoxElementText(valueSaveData.name + " - " + id));
} else {
listBox.add(new ListBoxElementText(id.toString()));
}
}
// }
}
}
// listBox.borderColor = new GuiColor(120, 120, 120, 0).getColor();
// listBox.backgroundColor = new GuiColor(0, 0, 0, 32).getColor();
addElement(listBox);
@ -90,6 +79,8 @@ public class GuiIDSU extends GuiBase {
addElement(nameFeild);
// tabs.add(new TabIDConfig(this));
}

View file

@ -0,0 +1,13 @@
package techreborn.client.gui.componets;
import techreborn.cofhLib.gui.GuiBase;
import techreborn.cofhLib.gui.element.TabBase;
/**
* Created by mark on 18/06/15.
*/
public class TabIDConfig extends TabBase {
public TabIDConfig(GuiBase gui) {
super(gui);
}
}