Advertisement
Guest User

Untitled

a guest
Aug 11th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. public class InGameOverlay extends Gui
  2. {
  3. private final Minecraft mc = Minecraft.getMinecraft();
  4. private final ResourceLocation rivenOverlay = new ResourceLocation(RivenMod.MODID + ":textures/gui/rivengui.png");
  5. private final FontRenderer fontRendererObj = mc.fontRendererObj;
  6.  
  7. private ArrayList<ISkill> skillListInstance;
  8.  
  9. private int zCooldownTicks;
  10. private boolean isZUseable;
  11.  
  12. public InGameOverlay() {
  13. skillListInstance = RivenMod.skillList;
  14. zCooldownTicks = 0;
  15. isZUseable = true;
  16. }
  17.  
  18. @SubscribeEvent
  19. public void renderGameOverlay(RenderGameOverlayEvent.Post event) {
  20. if(event.isCancelable() || event.type != ElementType.EXPERIENCE)
  21. return;
  22.  
  23. ScaledResolution sr = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
  24. int width = sr.getScaledWidth();
  25. int height = sr.getScaledHeight();
  26.  
  27. GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  28. GL11.glDisable(GL11.GL_LIGHTING);
  29.  
  30. GL11.glPushMatrix();
  31. mc.renderEngine.bindTexture(rivenOverlay);
  32. drawTexturedModalRect(0, height / 2 - 61, 0, 0, 30, 74); //Skill Icon Holder
  33.  
  34. for(int i = 0; i < skillListInstance.size(); i++) {
  35. drawTexturedModalRect(2, height / 2 - 61 + 2 + (18 * i), 16 + (16 * i), 74, 16, 16);
  36. }
  37.  
  38. if(zCooldownTicks > 0) drawCenteredString(this.fontRendererObj, "" + (zCooldownTicks / 20), 10, 10, 0xFFFFFFFF);
  39.  
  40. GL11.glPopMatrix();
  41. }
  42. .....
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement