Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.nextlevelminecraft.cad435.ClientDependencies.GUI.GliderGui;
- import com.nextlevelminecraft.cad435.ClientDependencies.libs.Shifty;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.gui.ScaledResolution;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.util.ResourceLocation;
- import org.lwjgl.opengl.GL11;
- //Drawing the gui
- public class GliderGui extends GuiContainer
- {
- ResourceLocation BG, Inv;
- public GliderGui(InventoryPlayer inventoryPlayer)
- {
- super(new GliderGuiContainer(inventoryPlayer));
- BG = new ResourceLocation("morestuff","textures/gui/GliderGui.png");
- Inv = new ResourceLocation("minecraft","textures/gui/container/inventory.png");
- }
- @Override
- protected void drawGuiContainerForegroundLayer(int param1, int param2)
- {
- }
- int m_width, expXSize,x,y;
- @Override
- protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
- {
- m_width = width / 2;
- expXSize = (int) (1.78 * ySize);
- x = (width - expXSize) / 2;
- y = (height - ySize) / 2;
- //Unteres SpielerInventar
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(field_147001_a);
- int k = this.guiLeft;
- int l = this.guiTop+24;
- mc.renderEngine.bindTexture(Inv);
- this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
- //breite = 1.78*höhe
- //Blaupause
- mc.renderEngine.bindTexture(BG);
- GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
- GL11.glPushMatrix();
- GL11.glTranslatef(33, -28, 0);
- GL11.glBegin(GL11.GL_QUADS);
- GL11.glTexCoord2f(0f, 0f); // top left
- GL11.glVertex2f(x, y);
- GL11.glTexCoord2f(0f, 1f); // bottom left
- GL11.glVertex2f(x, y + ySize * 0.8f);
- GL11.glTexCoord2f(1f, 1f); // bottom right
- GL11.glVertex2f(x + xSize * 1.28f, y + ySize * 0.8f);
- GL11.glTexCoord2f(1f, 0f); // top right
- GL11.glVertex2f(x + xSize * 1.28f, y);
- GL11.glEnd();
- GL11.glPopAttrib();
- GL11.glPopMatrix();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement