mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
yeah I was overcomplicating that, this is much better
This commit is contained in:
parent
e5b29e3352
commit
a000347877
@ -19,7 +19,6 @@ import net.minecraft.client.gui.GuiScreen;
|
|||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
|
||||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
@ -54,11 +53,7 @@ public class GUIScreenWikiRender extends GuiScreen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
if(this.mc.theWorld != null) {
|
GuiScreen.drawRect(0, 0, this.width, this.height, 0xFFFF00FF);
|
||||||
GuiScreen.drawRect(0, 0, this.width, this.height, 0xFFC6C6C6);
|
|
||||||
} else {
|
|
||||||
this.drawBackground(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Once we've reached the end of the array, immedaitely close this GUI
|
// Once we've reached the end of the array, immedaitely close this GUI
|
||||||
if(index >= preview.length) {
|
if(index >= preview.length) {
|
||||||
@ -66,7 +61,6 @@ public class GUIScreenWikiRender extends GuiScreen {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drawGuiContainerBackgroundLayer();
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
this.drawGuiContainerForegroundLayer(preview[index]);
|
this.drawGuiContainerForegroundLayer(preview[index]);
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
@ -86,35 +80,6 @@ public class GUIScreenWikiRender extends GuiScreen {
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void drawGuiContainerBackgroundLayer() {
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
{
|
|
||||||
|
|
||||||
ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
|
|
||||||
|
|
||||||
int size = 18;
|
|
||||||
double y = res.getScaledHeight_double() / scale - 18D;
|
|
||||||
|
|
||||||
GL11.glScaled(scale, scale, scale);
|
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 0.0F, 1.0F, 1.0F);
|
|
||||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
|
||||||
|
|
||||||
Tessellator tessellator = Tessellator.instance;
|
|
||||||
tessellator.startDrawingQuads();
|
|
||||||
tessellator.addVertex((double) 0, (double) y + size, (double) this.zLevel);
|
|
||||||
tessellator.addVertex((double) size, (double) y + size, (double) this.zLevel);
|
|
||||||
tessellator.addVertex((double) size, (double) y, (double) this.zLevel);
|
|
||||||
tessellator.addVertex((double) 0, (double) y, (double) this.zLevel);
|
|
||||||
tessellator.draw();
|
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
|
|
||||||
}
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void drawGuiContainerForegroundLayer(ItemStack preview) {
|
protected void drawGuiContainerForegroundLayer(ItemStack preview) {
|
||||||
if(preview == null) return;
|
if(preview == null) return;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user