Guest User

GUI

a guest
Apr 5th, 2016
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package dmz.icefeeling.ivi.tests;
  2.  
  3. import java.awt.Button;
  4. import java.util.List;
  5.  
  6. import org.lwjgl.input.Keyboard;
  7. import org.lwjgl.opengl.GL11;
  8.  
  9. import dmz.icefeeling.ivi.blocks.IFBlocks;
  10. import dmz.icefeeling.ivi.mod.DMZGlobal;
  11. import dmz.icefeeling.ivi.mod.Main;
  12. import net.minecraft.client.Minecraft;
  13. import net.minecraft.client.gui.FontRenderer;
  14. import net.minecraft.client.gui.GuiButton;
  15. import net.minecraft.client.gui.GuiCustomizeSkin;
  16. import net.minecraft.client.gui.GuiMerchant;
  17. import net.minecraft.client.gui.GuiOptionButton;
  18. import net.minecraft.client.gui.GuiTextField;
  19. import net.minecraft.client.gui.GuiYesNo;
  20. import net.minecraft.client.gui.inventory.GuiContainer;
  21. import net.minecraft.client.renderer.GlStateManager;
  22. import net.minecraft.client.resources.I18n;
  23. import net.minecraft.client.settings.GameSettings;
  24. import net.minecraft.entity.player.EntityPlayer;
  25. import net.minecraft.entity.player.InventoryPlayer;
  26. import net.minecraft.inventory.Container;
  27. import net.minecraft.inventory.ICrafting;
  28. import net.minecraft.inventory.IInventory;
  29. import net.minecraft.item.ItemStack;
  30. import net.minecraft.util.ChatComponentTranslation;
  31. import net.minecraft.util.EnumChatFormatting;
  32. import net.minecraft.util.ResourceLocation;
  33. import net.minecraft.util.StatCollector;
  34. import net.minecraft.world.EnumDifficulty;
  35. import net.minecraft.world.World;
  36. import net.minecraftforge.fml.relauncher.Side;
  37. import net.minecraftforge.fml.relauncher.SideOnly;;
  38.  
  39. @SideOnly(Side.CLIENT)
  40. public class GuiObsidianAnvil extends GuiContainer {
  41.  
  42.     public ContainerObsidianAnvil container;
  43.     private static final ResourceLocation OBANVILpng = new ResourceLocation(Main.instance + "textures/gui/ObsidianAnvil.png");
  44.  
  45.  
  46.     public GuiObsidianAnvil(InventoryPlayer playerIn, TileEntityObsidianAnvil TEO) {
  47.         super(new ContainerObsidianAnvil(playerIn, TEO));
  48.         container = (ContainerObsidianAnvil) inventorySlots;
  49.         this.xSize = 176;
  50.         this.ySize = 166;
  51.     }
  52.  
  53.     @Override
  54.     public void initGui() {
  55.         int posX = width = 0;
  56.         int posY = height = 0;
  57.         Keyboard.enableRepeatEvents(true);
  58.         this.buttonList.add(new GuiButton(1500, /*X*/155, /*Y*/40, /*WIDHTin*/150, /*HEIGHTin*/20, I18n.format("obanvil enchant", new Object[0])));
  59.     }
  60.     @Override
  61.     public void actionPerformed(GuiButton button) {
  62.          if (button.enabled)
  63.             {
  64.                 if (button.id == 1500 && button instanceof GuiButton/*GuiOBANVILButton*/)
  65.                 {
  66.                    
  67.                 }
  68.            }
  69.     }
  70.     @Override
  71.     public void drawScreen(int mouseX, int mouseY, float partialTicks) {
  72.         super.drawScreen(mouseX, mouseY, partialTicks);
  73.         this.drawModalRectWithCustomSizedTexture(mouseX, mouseY, 0, 0, 256, 256, 256, 256);
  74.     }
  75.     @Override
  76.     protected void drawGuiContainerForegroundLayer(int par1, int par2) {
  77.     }
  78.  
  79.     @Override
  80.     protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
  81.         this.mc.getTextureManager().bindTexture(OBANVILpng);
  82.     }
  83.  
  84. }
RAW Paste Data