Started working on the new config GUI. Looks pretty nice!
This commit is contained in:
@@ -1,6 +1,46 @@
|
||||
package de.skate702.craftingkeys.config;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class GuiConfig extends GuiScreen {
|
||||
|
||||
public static final int GuiID = 702;
|
||||
private GuiTextField testText;
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
|
||||
buttonList.add((new GuiButton(0, width / 2 - 58, height / 2 - 84, 19, 18, "Q")));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
|
||||
//GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//GL11.glTranslatef(0.0f, 0.0f, -1.0f);
|
||||
|
||||
Color pureWhite = new Color(255, 255, 255, 255);
|
||||
//drawWorldBackground(0);
|
||||
drawDefaultBackground();
|
||||
|
||||
drawCenteredString(fontRendererObj, "Crafting Keys Config", width / 2, height / 2 - 115, pureWhite.getRGB());
|
||||
|
||||
mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/crafting_table.png"));
|
||||
drawTexturedModalRect(width / 2 - 86, height / 2 - 100, 1, 0, 174, 80);
|
||||
|
||||
drawHorizontalLine(width / 2 - 110, width / 2 + 110, height / 2 - 20, pureWhite.getRGB());
|
||||
|
||||
drawCenteredString(fontRendererObj, "Configure your keys here. Click \"Save\" when finished!", width / 2, height / 2 - 10, pureWhite.getRGB());
|
||||
|
||||
//drawRect(width / 2 - 100, width / 2 + 100, height / 2 - 5, height / 2 + 5, pureWhite.getRGB());
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package de.skate702.craftingkeys.config;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GuiConfigHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (ID == GuiConfig.GuiID) {
|
||||
return new GuiConfig();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user