Advertisement
Guest User

Untitled

a guest
Sep 19th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.kpdus.com/jad.html
  3. // Decompiler options: packimports(3) braces deadcode
  4.  
  5. package net.minecraft.src;
  6.  
  7. import java.util.List;
  8. import net.minecraft.client.Minecraft;
  9.  
  10. // Referenced classes of package net.minecraft.src:
  11. // GuiScreen, GuiButton, StatCollector, GuiOptions,
  12. // StatList, StatFileWriter, World, GuiMainMenu,
  13. // GuiAchievements, GuiStats, MathHelper
  14.  
  15. public class GuiIngameMenu extends GuiScreen
  16. {
  17.  
  18. public GuiIngameMenu()
  19. {
  20. updateCounter2 = 0;
  21. updateCounter = 0;
  22. }
  23.  
  24. public void initGui()
  25. {
  26. updateCounter2 = 0;
  27. controlList.clear();
  28. byte byte0 = -16;
  29. controlList.add(new GuiButton(1, width / 2 - 100, height / 4 + 120 + byte0, "Save and quit to title"));
  30. if(mc.isMultiplayerWorld())
  31. {
  32. ((GuiButton)controlList.get(0)).displayString = "Disconnect";
  33. }
  34. controlList.add(new GuiButton(4, width / 2 - 100, height / 4 + 24 + byte0, "Back to game"));
  35. controlList.add(new GuiButton(0, width / 2 - 100, height / 4 + 96 + byte0, "Options..."));
  36. controlList.add(new GuiButton(5, width / 2 - 100, height / 4 + 48 + byte0, 98, 20, StatCollector.translateToLocal("gui.achievements")));
  37. controlList.add(new GuiButton(6, width / 2 + 2, height / 4 + 48 + byte0, 98, 20, StatCollector.translateToLocal("gui.stats")));
  38. controlList.add(new GuiButton(7, width / 2 - 100, height / 4 + 73 + byte0, "Mods and Textures"));
  39. }
  40.  
  41. protected void actionPerformed(GuiButton guibutton)
  42. {
  43. if(guibutton.id == 0)
  44. {
  45. mc.displayGuiScreen(new GuiOptions(this, mc.gameSettings));
  46. }
  47. if(guibutton.id == 1)
  48. {
  49. mc.statFileWriter.readStat(StatList.leaveGameStat, 1);
  50. if(mc.isMultiplayerWorld())
  51. {
  52. mc.theWorld.sendQuittingDisconnectingPacket();
  53. }
  54. mc.changeWorld1(null);
  55. mc.displayGuiScreen(new GuiMainMenu());
  56. }
  57. if(guibutton.id == 4)
  58. {
  59. mc.displayGuiScreen(null);
  60. mc.setIngameFocus();
  61. }
  62. if(guibutton.id == 5)
  63. {
  64. mc.displayGuiScreen(new GuiAchievements(mc.statFileWriter));
  65. }
  66. if(guibutton.id == 6)
  67. {
  68. mc.displayGuiScreen(new GuiStats(this, mc.statFileWriter));
  69. }
  70. if(guibutton.id == 7)
  71. {
  72. mc.displayGuiScreen(new GuiTexturePacks(this));
  73. }
  74. }
  75.  
  76. public void updateScreen()
  77. {
  78. super.updateScreen();
  79. updateCounter++;
  80. }
  81.  
  82. public void drawScreen(int i, int j, float f)
  83. {
  84. drawDefaultBackground();
  85. boolean flag = !mc.theWorld.func_650_a(updateCounter2++);
  86. if(flag || updateCounter < 20)
  87. {
  88. float f1 = ((float)(updateCounter % 10) + f) / 10F;
  89. f1 = MathHelper.sin(f1 * 3.141593F * 2.0F) * 0.2F + 0.8F;
  90. int k = (int)(255F * f1);
  91. drawString(fontRenderer, "Saving level..", 8, height - 16, k << 16 | k << 8 | k);
  92. }
  93. drawCenteredString(fontRenderer, "Game menu", width / 2, 40, 0xffffff);
  94. super.drawScreen(i, j, f);
  95. }
  96.  
  97. private int updateCounter2;
  98. private int updateCounter;
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement