Fix modlist to use the new texture binding functions, i think

This commit is contained in:
Christian 2013-01-12 00:27:11 -05:00
parent 59af780c91
commit 3e5a3fb0e4

View file

@ -16,6 +16,7 @@ package cpw.mods.fml.client;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
@ -23,6 +24,8 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSmallButton; import net.minecraft.client.gui.GuiSmallButton;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.Texture;
import net.minecraft.client.renderer.TextureManager;
import net.minecraft.util.StringTranslate; import net.minecraft.util.StringTranslate;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -118,17 +121,16 @@ public class GuiModList extends GuiScreen
int shifty = 35; int shifty = 35;
if (!selectedMod.getMetadata().logoFile.isEmpty()) if (!selectedMod.getMetadata().logoFile.isEmpty())
{ {
int texture = this.field_73882_e.field_71446_o.func_78341_b(selectedMod.getMetadata().logoFile); List<Texture> texList = TextureManager.func_94267_b().func_94266_e(selectedMod.getMetadata().logoFile);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Texture texture = texList.get(0);
this.field_73882_e.field_71446_o.func_78342_b(texture); texture.func_94277_a(0);
Dimension dim = TextureFXManager.instance().getTextureDimensions(texture);
int top = 32; int top = 32;
Tessellator tess = Tessellator.field_78398_a; Tessellator tess = Tessellator.field_78398_a;
tess.func_78382_b(); tess.func_78382_b();
tess.func_78374_a(offset, top + dim.height, field_73735_i, 0, 1); tess.func_78374_a(offset, top + texture.func_94284_b(), field_73735_i, 0, 1);
tess.func_78374_a(offset + dim.width, top + dim.height, field_73735_i, 1, 1); tess.func_78374_a(offset + texture.func_94282_c(), top + texture.func_94284_b(), field_73735_i, 1, 1);
tess.func_78374_a(offset + dim.width, top, field_73735_i, 1, 0); tess.func_78374_a(offset + texture.func_94282_c(), top, field_73735_i, 1, 0);
tess.func_78374_a(offset, top, field_73735_i, 0, 0); tess.func_78374_a(offset, top, field_73735_i, 0, 0);
tess.func_78381_a(); tess.func_78381_a();
shifty += 65; shifty += 65;