Mrolas

GuiShopStop.java

Dec 28th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.57 KB | None | 0 0
  1. package mrolas.muchMoney.common.gui;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import mrolas.muchMoney.common.gui.container.ContainerShopStop;
  6. import mrolas.muchMoney.common.lib.Reference;
  7. import mrolas.muchMoney.common.tileEntities.TileEntityShopStop;
  8. import net.minecraft.client.Minecraft;
  9. import net.minecraft.client.gui.inventory.GuiContainer;
  10. import net.minecraft.entity.player.InventoryPlayer;
  11. import net.minecraft.util.ResourceLocation;
  12.  
  13. public class GuiShopStop
  14.     extends GuiContainer
  15. {
  16.     private static final ResourceLocation texture = new ResourceLocation("muchmoney", "textures/gui/shop_stop.png");
  17.    
  18.     private TileEntityShopStop shopStop;
  19.    
  20.     public GuiShopStop (InventoryPlayer inventory, TileEntityShopStop entity)
  21.     {
  22.         super(new ContainerShopStop(inventory, entity));
  23.        
  24.         this.shopStop = entity;
  25.        
  26.         xSize = 176;
  27.         ySize = 256;
  28.     }
  29.  
  30.     @Override
  31.     protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
  32.     {
  33.         GL11.glColor4f(1, 1, 1, 1);
  34.        
  35.         Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
  36.         drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
  37.     }
  38.    
  39.     @Override
  40.     protected void drawGuiContainerForegroundLayer (int i, int j)
  41.     {
  42.         fontRenderer.drawString("The Shop Stop", xSize / 2 - fontRenderer.getStringWidth("The Shop Stop") / 2, 6, Reference.HEX_DARK_GREY);
  43.         fontRenderer.drawString("Inventory", 8, 163, Reference.HEX_DARK_GREY);
  44.         fontRenderer.drawString("Coins", 8, 133, Reference.HEX_DARK_GREY);
  45.         fontRenderer.drawString("Item", 133 - fontRenderer.getStringWidth("Item") / 2, 133, Reference.HEX_DARK_GREY);
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment