Files
CustomNPC-Plus/src/main/java/noppes/npcs/client/gui/util/GuiButtonNextPage.java
T

36 lines
1.2 KiB
Java
Raw Normal View History

2018-09-13 12:03:28 -04:00
package noppes.npcs.client.gui.util;
import net.minecraft.client.Minecraft;
import net.minecraft.util.ResourceLocation;
2023-01-12 21:33:06 -05:00
import org.lwjgl.opengl.GL11;
2018-09-13 12:03:28 -04:00
2025-03-12 20:12:01 -04:00
public class GuiButtonNextPage extends GuiNpcButton {
2018-09-13 12:03:28 -04:00
private final boolean field_146151_o;
private static final ResourceLocation field_110405_a = new ResourceLocation("textures/gui/book.png");
2025-03-12 20:12:01 -04:00
public GuiButtonNextPage(int par1, int par2, int par3, boolean par4) {
2018-09-13 12:03:28 -04:00
super(par1, par2, par3, 23, 13, "");
this.field_146151_o = par4;
}
@Override
2025-03-12 20:12:01 -04:00
public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_) {
if (this.visible) {
2018-09-13 12:03:28 -04:00
boolean flag = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
p_146112_1_.getTextureManager().bindTexture(field_110405_a);
int k = 0;
int l = 192;
2025-03-12 20:12:01 -04:00
if (flag) {
2018-09-13 12:03:28 -04:00
k += 23;
}
2025-03-12 20:12:01 -04:00
if (!this.field_146151_o) {
2018-09-13 12:03:28 -04:00
l += 13;
}
this.drawTexturedModalRect(this.xPosition, this.yPosition, k, l, 23, 13);
}
}
}