Removed usage of GL11 in favor of using GlStateManager.
This commit is contained in:
@@ -23,10 +23,9 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
@@ -195,17 +194,17 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
this.width = 8;
|
||||
this.height = 8;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef( this.xPosition, this.yPosition, 0.0F );
|
||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate( this.xPosition, this.yPosition, 0.0F );
|
||||
GlStateManager.scale( 0.5f, 0.5f, 0.5f );
|
||||
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
GlStateManager.color( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
@@ -218,17 +217,17 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
this.drawTexturedModalRect( 0, 0, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
GlStateManager.color( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
@@ -242,7 +241,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
}
|
||||
}
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
|
||||
private int getIconIndex()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
public void draw( final AEBaseGui g )
|
||||
{
|
||||
g.bindTexture( "minecraft", "gui/container/creative_inventory/tabs.png" );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if( this.getRange() == 0 )
|
||||
{
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
package appeng.client.gui.widgets;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -77,7 +75,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height;
|
||||
|
||||
|
||||
@@ -21,10 +21,9 @@ package appeng.client.gui.widgets;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
@@ -65,7 +64,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
{
|
||||
final int iconIndex = this.getIconIndex();
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
GlStateManager.color( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( new ResourceLocation( "appliedenergistics2", "textures/guis/states.png" ) );
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user