diff --git a/resources/assets/nei/textures/nei_tabbed_sprites.png b/resources/assets/nei/textures/nei_tabbed_sprites.png index 60c131b0..36eab2cc 100644 Binary files a/resources/assets/nei/textures/nei_tabbed_sprites.png and b/resources/assets/nei/textures/nei_tabbed_sprites.png differ diff --git a/src/codechicken/nei/config/OptionToggleButtonBoubs.java b/src/codechicken/nei/config/OptionToggleButtonBoubs.java index a6421012..61739cda 100644 --- a/src/codechicken/nei/config/OptionToggleButtonBoubs.java +++ b/src/codechicken/nei/config/OptionToggleButtonBoubs.java @@ -1,18 +1,16 @@ package codechicken.nei.config; -import codechicken.lib.render.CCRenderState; -import codechicken.nei.Image; import codechicken.nei.LayoutManager; +import codechicken.nei.drawable.DrawableBuilder; +import codechicken.nei.drawable.DrawableResource; import org.lwjgl.opengl.GL11; import java.awt.Rectangle; -import static codechicken.lib.gui.GuiDraw.changeTexture; -import static codechicken.lib.gui.GuiDraw.drawStringC; -import static codechicken.lib.gui.GuiDraw.drawTexturedModalRect; +public class OptionToggleButtonBoubs extends OptionButton { + private static final DrawableResource coolBoubs = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 48, 16, 22, 22).build(); + private static final DrawableResource angryBoubs = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 70, 16, 22, 22).build(); -public class OptionToggleButtonBoubs extends OptionButton -{ public final boolean prefixed; public OptionToggleButtonBoubs(String name, boolean prefixed) { @@ -32,19 +30,17 @@ public class OptionToggleButtonBoubs extends OptionButton public void drawButton(int mx, int my) { Rectangle b = buttonSize(); LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, getButtonTex(mx, my)); - if(state()) { - changeTexture("nei:textures/nei_sprites.png"); - GL11.glColor4f(1, 1, 1, 1); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - Image image = new Image(48, 52, 24, 24); -// drawTexturedModalRect(x, y, image.x, image.y, image.width, image.height); - drawTexturedModalRect(b.x + (b.width/2) - (image.width/2), b.y, image.x, image.y, image.width, image.height); - GL11.glDisable(GL11.GL_BLEND); + GL11.glColor4f(1, 1, 1, 1); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + if(state()) { + coolBoubs.draw(b.x + (b.width/2) - (coolBoubs.getWidth()/2), b.y); }else { - drawStringC(getButtonText(), b.x, b.y, b.width, b.height, getTextColour(mx, my)); + angryBoubs.draw(b.x + (b.width/2) - (angryBoubs.getWidth()/2), b.y); } + GL11.glDisable(GL11.GL_BLEND); + } public String getButtonText() {