Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GuiBasicSafe extends GuiContainer {
- //public final int xSizeOfTexture = 176;
- //public final int ySizeOfTexture = 88;
- public void initGui(){
- try {
- this.controlList.clear();
- int posX = (10);
- int posY = (10);
- this.controlList.add(new GuiButton(1, posX+ 10, posY + 10, 10, 10, "1"));
- this.controlList.add(new GuiButton(2, posX+ 10, posY + 20, 10, 10, "2"));
- this.controlList.add(new GuiButton(3, posX+ 10, posY + 30, 10, 10, "3"));
- this.controlList.add(new GuiButton(4, posX+ 20, posY + 10, 10, 10, "4"));
- this.controlList.add(new GuiButton(5, posX+ 20, posY + 20, 10, 10, "5"));
- this.controlList.add(new GuiButton(6, posX+ 20, posY + 30, 10, 10, "6"));
- this.controlList.add(new GuiButton(7, posX+ 30, posY + 10, 10, 10, "7"));
- this.controlList.add(new GuiButton(8, posX+ 30, posY + 20, 10, 10, "8"));
- this.controlList.add(new GuiButton(9, posX+ 30, posY + 30, 10, 10, "9"));
- this.controlList.add(new GuiButton(10, posX+ 10, posY + 10, 30, 15, "enter"));
- this.controlList.add(new GuiButton(11, posX+ 40, posY + 10, 30, 15, "reset"));
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- public GuiBasicSafe (TileBasicSafe tileEntity, InventoryPlayer inventoryPlayer) {
- super(new ContainerBasicSafe(tileEntity, inventoryPlayer));
- }
- @Override
- protected void drawGuiContainerForegroundLayer() {
- //draw text and stuff here
- //the parameters for drawString are: string, x, y, color
- fontRenderer.drawString("LockBox", 8, 6, 4210752);
- //draws "Inventory" or your regional equivalent
- fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- //draw your Gui here, only thing you need to change is the path
- int texture = mc.renderEngine.getTexture(CommonProxy.GUI_BLANK);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(texture);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement