Posted April 18, 201411 yr Ok, I have an overlay that slides in and out of the screen on a key press. While it's sliding, it creates some weird delay shadows behind it. This is what the delayed shadow looks like: Here's my render code: package legions.gui; import legions.ClientProxyL; import legions.UtilL; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.sun.org.apache.xml.internal.security.utils.I18n; public class GuiMenuL extends GuiScreen { public static final ResourceLocation TEXTURE = UtilL.newResource("textures/gui/icons.png"); public void draw(ScaledResolution sr) { GL11.glPushMatrix(); GL11.glTranslatef(0, ClientProxyL.guiY, 0); UtilL.MC.renderEngine.bindTexture(TEXTURE); this.drawTexturedModalRect(0, 0, 0, 0, 128, 65); int x = (int) UtilL.getScaledX(12, sr); UtilL.drawOutlinedString("Menu", x, (int) UtilL.getScaledY(10, sr), 0xFFFFFF, 0x000000); switch(ClientProxyL.currentMenu) { case (0): { UtilL.drawString("1-Summon troops", x, (int) UtilL.getScaledY(30, sr), 0x000000); UtilL.drawString("2-Order troops", x, (int) UtilL.getScaledY(48, sr), 0x000000); UtilL.drawString("3-", x, (int) UtilL.getScaledY(66, sr), 0x000000); UtilL.drawString("4-", x, (int) UtilL.getScaledY(84, sr), 0x000000); UtilL.drawString("5-", x, (int) UtilL.getScaledY(102, sr), 0x000000); break; } case (1): { UtilL.drawString("1-All troops", x, (int) UtilL.getScaledY(30, sr), 0x000000); UtilL.drawString("2-Group 1", x, (int) UtilL.getScaledY(48, sr), 0x000000); UtilL.drawString("3-Group 2", x, (int) UtilL.getScaledY(66, sr), 0x000000); UtilL.drawString("4-Group 3", x, (int) UtilL.getScaledY(84, sr), 0x000000); UtilL.drawString("5-Group 4", x, (int) UtilL.getScaledY(102, sr), 0x000000); break; } } GL11.glPopMatrix(); } } Kain
April 19, 201411 yr Author Ok, now the menu is just black now. The only change's I've made was some of the text I think. package legions.gui; import legions.ClientProxyL; import legions.UtilL; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class GuiMenuL extends GuiScreen { public static final ResourceLocation TEXTURE = UtilL.newResource("textures/gui/icons.png"); public void draw(ScaledResolution sr) { GL11.glPushMatrix(); GL11.glTranslatef(0, ClientProxyL.guiY, 0); UtilL.MC.renderEngine.bindTexture(TEXTURE); this.drawTexturedModalRect(0, 0, 0, 0, 128, 65); int x = (int) UtilL.getScaledX(12, sr); UtilL.drawOutlinedString("Menu", x, (int) UtilL.getScaledY(10, sr), 0xFFFFFF, 0x000000); switch(ClientProxyL.currentMenu) { case (0): { UtilL.drawString("1-Summon troops", x, (int) UtilL.getScaledY(30, sr), 0x000000); UtilL.drawString("2-Order troops", x, (int) UtilL.getScaledY(48, sr), 0x000000); UtilL.drawString("3-", x, (int) UtilL.getScaledY(66, sr), 0x000000); UtilL.drawString("4-", x, (int) UtilL.getScaledY(84, sr), 0x000000); UtilL.drawString("5-", x, (int) UtilL.getScaledY(102, sr), 0x000000); break; } case (1): { UtilL.drawString("1-All troops", x, (int) UtilL.getScaledY(30, sr), 0x000000); UtilL.drawString("2-Group 1", x, (int) UtilL.getScaledY(48, sr), 0x000000); UtilL.drawString("3-Group 2", x, (int) UtilL.getScaledY(66, sr), 0x000000); UtilL.drawString("4-Group 3", x, (int) UtilL.getScaledY(84, sr), 0x000000); UtilL.drawString("5-Group 4", x, (int) UtilL.getScaledY(102, sr), 0x000000); break; } } GL11.glPopMatrix(); } } Kain
April 20, 201411 yr You didn't disable GL11's lighting and then re enable it Former developer for DivineRPG, Pixelmon and now the maker of Essence of the Gods
April 20, 201411 yr Author You didn't disable GL11's lighting and then re enable it Nope Resetting the color did the job for me: GL11.glColor3f(1, 1, 1); Kain
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.