Advertisement
Guest User

GuiTest

a guest
Sep 14th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import org.lwjgl.input.Keyboard;
  4. import org.lwjgl.input.Mouse;
  5. import org.lwjgl.opengl.GL11;
  6.  
  7. public class GuiTest extends GuiScreen
  8. {
  9. // private int amount, page;
  10. public void initGui()
  11. {
  12. // page = 0;
  13. //addButtons(page);
  14. }
  15.  
  16. public void keyTyped(char c, int i)
  17. {
  18. System.out.println(i);
  19. super.keyTyped(c, i);
  20. }
  21.  
  22. public void updateScreen()
  23. {
  24. if(Keyboard.isKeyDown(Keyboard.KEY_0))
  25. {
  26. System.out.println("0");
  27. }
  28. }
  29.  
  30. /*public void addButtons(int page)
  31. {
  32. controlList.clear();
  33. if(page == 0)
  34. {
  35. controlList.add(new GuiButton(0, width/2-100, height/2-10, 200, 20, "Change page"));
  36. controlList.add(new GuiButton(1, width/2-100, height/2+10, 200, 20, "Display page"));
  37. }
  38. if(page == 1)
  39. {
  40. controlList.add(new GuiButton(1, width/2-100, height/2-10, 200, 20, "Display Page 2"));
  41. }
  42. }
  43.  
  44.  
  45.  
  46. public void actionPerformed(GuiButton gb)
  47. {
  48. if(gb.id == 0)
  49. {
  50. page++;
  51. addButtons(page);
  52. }
  53. if(gb.id == 1)
  54. {
  55. System.out.println(page);
  56. }
  57. }*/
  58.  
  59. public void drawScreen(int i, int j, float f)
  60. {
  61. drawDefaultBackground();
  62. /*drawRect(width/2, height/2, width/2 + 100, height/2 + 100, 0xffffffff);
  63. drawCenteredString(fontRenderer, "Hello, World", width/2, height/2, 0xff0000);
  64. GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
  65. GL11.glEnable(3042);
  66. GL11.glBindTexture(3553, mc.renderEngine.getTexture("/circle.png"));
  67. drawTexturedModalRect(width/2, height/2, 10, 1, 7, 7);
  68. GL11.glDisable(3042);*/
  69. super.drawScreen(i, j, f);
  70. }
  71.  
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement