Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.19 KB | None | 0 0
  1. package de.promolitor.tchelper;
  2.  
  3. import net.minecraftforge.fml.relauncher.SideOnly;
  4.  
  5. import de.promolitor.tchelper.helper.AspectCalculation;
  6. import net.minecraft.client.Minecraft;
  7. import net.minecraft.client.gui.Gui;
  8. import net.minecraft.client.gui.ScaledResolution;
  9. import net.minecraft.client.renderer.GlStateManager;
  10. import net.minecraft.util.ResourceLocation;
  11. import net.minecraftforge.client.event.RenderGameOverlayEvent;
  12. import net.minecraftforge.fml.relauncher.Side;
  13. import net.minecraftforge.fml.relauncher.SideOnly;
  14.  
  15. @SideOnly(Side.CLIENT)
  16. public class GuiMain extends Gui {
  17.  
  18.     private ResourceLocation tchelperBackground = new ResourceLocation(TCHelperMain.MODID, "TCHelperBackground.png");
  19.     private ResourceLocation tchelperRight = new ResourceLocation(TCHelperMain.MODID, "right2.png");
  20.  
  21.     /**
  22.      * @param mc
  23.      * @param event
  24.      */
  25.     public GuiMain(Minecraft mc, RenderGameOverlayEvent event) {
  26.         ScaledResolution scaled = new ScaledResolution(mc);
  27.         int width = scaled.getScaledWidth();
  28.         int height = scaled.getScaledHeight();
  29.         int posX = width;
  30.         int posY = height;
  31.         int i = 5;
  32.  
  33.         System.out.println(AspectCalculation.map.get(AspectCalculation.solvedIssues.get(0)[0]).getImage());
  34.         System.out.println(tchelperRight);
  35.         mc.getTextureManager().bindTexture(tchelperBackground);
  36.         drawTexturedModalRect((posX / 2) - 64, (posY / 2) - 64, 0, 0, 64, 64);
  37.         mc.getTextureManager().bindTexture(tchelperRight);
  38.         drawTexturedModalRect(posX / 2, posY / 2, 0, 0, 32, 32);
  39.  
  40.         /*
  41.          * for (String[] solved : AspectCalculation.solvedIssues) { //
  42.          * System.out.println(posX + "/" + posY); int aspects = solved.length;
  43.          * int overallSpaces = aspects + aspects - 1; for (int y = 0; y <
  44.          * aspects; y++) {
  45.          * mc.getTextureManager().bindTexture(AspectCalculation.map.get(solved[y
  46.          * ]).getImage()); mc.ingameGUI.drawTexturedModalRect(posX -
  47.          * ((overallSpaces - y) * 32 + (overallSpaces - y) * 1), posY, 0, 0, 32,
  48.          * 32); if (y != aspects - 1) {
  49.          * mc.getTextureManager().bindTexture(tchelperRight);
  50.          * mc.ingameGUI.drawTexturedModalRect( posX - ((overallSpaces - y - 1) *
  51.          * 32 + (overallSpaces - y - 1) * 2), posY, 0, 0, 32, 32); }
  52.          *
  53.          * } posY = posY + 50; }
  54.          */
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement