Code formatter take 2
This commit is contained in:
parent
33985f1a31
commit
5eed5b161d
450 changed files with 32768 additions and 26684 deletions
|
@ -1,22 +1,22 @@
|
|||
package techreborn.manual.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ButtonUtil
|
||||
public class ButtonUtil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addBackButton(int ID, int X, int Y, List buttonList)
|
||||
{
|
||||
buttonList.add(new GuiButtonCustomTexture(ID, X, Y, 50, 60, 17, 12, "button", "", "", 0, 11, 10, 16));
|
||||
buttonList.add(new GuiButtonCustomTexture(ID, X, Y, 50, 60, 17, 12, "button", "", "", 0, 11, 10, 16));
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void addNextButton(int ID, int X, int Y, List buttonList)
|
||||
{
|
||||
buttonList.add(new GuiButtonCustomTexture(ID, X, Y, 50, 60, 17, 12, "button", "", "", 0, 1, 10, 17));
|
||||
buttonList.add(new GuiButtonCustomTexture(ID, X, Y, 50, 60, 17, 12, "button", "", "", 0, 1, 10, 17));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,45 +4,59 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiButtonAHeight extends GuiButton {
|
||||
public class GuiButtonAHeight extends GuiButton
|
||||
{
|
||||
|
||||
public GuiButtonAHeight(int id, int xPos, int yPos, int width, int hight, String displayString) {
|
||||
super(id, xPos, yPos, width, hight, displayString);
|
||||
}
|
||||
public GuiButtonAHeight(int id, int xPos, int yPos, int width, int hight, String displayString)
|
||||
{
|
||||
super(id, xPos, yPos, width, hight, displayString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY) {
|
||||
if (this.visible) {
|
||||
FontRenderer fontrenderer = minecraft.fontRendererObj;
|
||||
minecraft.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height);
|
||||
this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height);
|
||||
@Override
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
FontRenderer fontrenderer = minecraft.fontRendererObj;
|
||||
minecraft.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height);
|
||||
this.drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2,
|
||||
46 + k * 20, this.width / 2, this.height);
|
||||
|
||||
if (this.height < 20) {
|
||||
this.drawTexturedModalRect(xPosition, yPosition + 3, 0, (46 + k * 20) + 20 - height + 3, width / 2, height - 3);
|
||||
this.drawTexturedModalRect(xPosition + width / 2, yPosition + 3, 200 - width / 2, (46 + k * 20) + 20 - height + 3, width / 2, height - 3);
|
||||
}
|
||||
if (this.height < 20)
|
||||
{
|
||||
this.drawTexturedModalRect(xPosition, yPosition + 3, 0, (46 + k * 20) + 20 - height + 3, width / 2,
|
||||
height - 3);
|
||||
this.drawTexturedModalRect(xPosition + width / 2, yPosition + 3, 200 - width / 2,
|
||||
(46 + k * 20) + 20 - height + 3, width / 2, height - 3);
|
||||
}
|
||||
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
int l = 14737632;
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
int l = 14737632;
|
||||
|
||||
if (packedFGColour != 0) {
|
||||
l = packedFGColour;
|
||||
} else if (!this.enabled) {
|
||||
l = 10526880;
|
||||
} else if (this.hovered) {
|
||||
l = 16777120;
|
||||
}
|
||||
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
|
||||
}
|
||||
}
|
||||
if (packedFGColour != 0)
|
||||
{
|
||||
l = packedFGColour;
|
||||
} else if (!this.enabled)
|
||||
{
|
||||
l = 10526880;
|
||||
} else if (this.hovered)
|
||||
{
|
||||
l = 16777120;
|
||||
}
|
||||
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2,
|
||||
this.yPosition + (this.height - 8) / 2, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
package techreborn.manual.util;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiButtonCustomTexture extends GuiButtonExt
|
||||
{
|
||||
public int textureU;
|
||||
public int textureV;
|
||||
public String texturename;
|
||||
public String LINKED_PAGE;
|
||||
public String NAME;
|
||||
public int textureU;
|
||||
public int textureV;
|
||||
public String texturename;
|
||||
public String LINKED_PAGE;
|
||||
public String NAME;
|
||||
public String imageprefix = "techreborn:textures/manual/elements/";
|
||||
public int buttonHeight;
|
||||
public int buttonWidth;
|
||||
|
@ -24,52 +25,53 @@ public class GuiButtonCustomTexture extends GuiButtonExt
|
|||
public int textureH;
|
||||
public int textureW;
|
||||
|
||||
public GuiButtonCustomTexture(int id, int xPos, int yPos, int u, int v, int buttonWidth, int buttonHeight, String texturename, String linkedPage, String name, int buttonU, int buttonV, int textureH, int textureW)
|
||||
{
|
||||
super(id, xPos, yPos, buttonWidth, buttonHeight, "_");
|
||||
this.textureU = u;
|
||||
this.textureV = v;
|
||||
this.texturename = texturename;
|
||||
this.NAME = name;
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
this.buttonHeight = height;
|
||||
this.buttonWidth = width;
|
||||
this.buttonU = buttonU;
|
||||
this.buttonV = buttonV;
|
||||
this.textureH = textureH;
|
||||
this.textureW = textureW;
|
||||
}
|
||||
|
||||
public void drawButton(Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition
|
||||
&& mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
int u = textureU;
|
||||
int v = textureV;
|
||||
public GuiButtonCustomTexture(int id, int xPos, int yPos, int u, int v, int buttonWidth, int buttonHeight,
|
||||
String texturename, String linkedPage, String name, int buttonU, int buttonV, int textureH, int textureW)
|
||||
{
|
||||
super(id, xPos, yPos, buttonWidth, buttonHeight, "_");
|
||||
this.textureU = u;
|
||||
this.textureV = v;
|
||||
this.texturename = texturename;
|
||||
this.NAME = name;
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
this.buttonHeight = height;
|
||||
this.buttonWidth = width;
|
||||
this.buttonU = buttonU;
|
||||
this.buttonV = buttonV;
|
||||
this.textureH = textureH;
|
||||
this.textureW = textureW;
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
u += width;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
renderImage(this.xPosition, this.yPosition);
|
||||
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3, Color.white.getRGB());
|
||||
}
|
||||
}
|
||||
|
||||
public void renderImage(int offsetX, int offsetY)
|
||||
{
|
||||
public void drawButton(Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
int u = textureU;
|
||||
int v = textureV;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
u += width;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
renderImage(this.xPosition, this.yPosition);
|
||||
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3,
|
||||
Color.white.getRGB());
|
||||
}
|
||||
}
|
||||
|
||||
public void renderImage(int offsetX, int offsetY)
|
||||
{
|
||||
TextureManager render = Minecraft.getMinecraft().renderEngine;
|
||||
render.bindTexture(new ResourceLocation(imageprefix + this.texturename + ".png"));
|
||||
|
||||
|
@ -78,10 +80,10 @@ public class GuiButtonCustomTexture extends GuiButtonExt
|
|||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(offsetX, offsetY, this.buttonU, this.buttonV, this.textureW, this.textureH);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getIsHovering()
|
||||
{
|
||||
return hovered;
|
||||
}
|
||||
public boolean getIsHovering()
|
||||
{
|
||||
return hovered;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,59 +1,67 @@
|
|||
package techreborn.manual.util;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
public class GuiButtonItemTexture extends GuiButtonExt
|
||||
{
|
||||
|
||||
public class GuiButtonItemTexture extends GuiButtonExt {
|
||||
public int textureU;
|
||||
public int textureV;
|
||||
public ItemStack itemstack;
|
||||
public String LINKED_PAGE;
|
||||
public String NAME;
|
||||
|
||||
public int textureU;
|
||||
public int textureV;
|
||||
public ItemStack itemstack;
|
||||
public String LINKED_PAGE;
|
||||
public String NAME;
|
||||
public GuiButtonItemTexture(int id, int xPos, int yPos, int u, int v, int width, int height, ItemStack stack,
|
||||
String linkedPage, String name)
|
||||
{
|
||||
super(id, xPos, yPos, width, height, "_");
|
||||
textureU = u;
|
||||
textureV = v;
|
||||
itemstack = stack;
|
||||
NAME = name;
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
}
|
||||
|
||||
public GuiButtonItemTexture(int id, int xPos, int yPos, int u, int v, int width, int height, ItemStack stack, String linkedPage, String name) {
|
||||
super(id, xPos, yPos, width, height, "_");
|
||||
textureU = u;
|
||||
textureV = v;
|
||||
itemstack = stack;
|
||||
NAME = name;
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
}
|
||||
public void drawButton(Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
int u = textureU;
|
||||
int v = textureV;
|
||||
|
||||
public void drawButton(Minecraft mc, int mouseX, int mouseY) {
|
||||
if (this.visible) {
|
||||
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition
|
||||
&& mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
mc.getTextureManager().bindTexture(buttonTextures);
|
||||
int u = textureU;
|
||||
int v = textureV;
|
||||
|
||||
if (flag) {
|
||||
u += width;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
if (flag)
|
||||
{
|
||||
u += width;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glEnable(32826);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem();
|
||||
itemRenderer.renderItemIntoGUI(itemstack, this.xPosition, this.yPosition);
|
||||
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3, Color.white.getRGB());
|
||||
}
|
||||
}
|
||||
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3,
|
||||
Color.white.getRGB());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getIsHovering() {
|
||||
return hovered;
|
||||
}
|
||||
public boolean getIsHovering()
|
||||
{
|
||||
return hovered;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,63 +1,77 @@
|
|||
package techreborn.manual.util;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
public class GuiButtonTextOnly extends GuiButton
|
||||
{
|
||||
public String LINKED_PAGE;
|
||||
public int textColour;
|
||||
|
||||
public class GuiButtonTextOnly extends GuiButton {
|
||||
public String LINKED_PAGE;
|
||||
public int textColour;
|
||||
public GuiButtonTextOnly(int id, int xPos, int yPos, int width, int hight, String displayString, String linkedPage,
|
||||
int colour)
|
||||
{
|
||||
super(id, xPos, yPos, width, hight, displayString);
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
this.textColour = colour;
|
||||
}
|
||||
|
||||
public GuiButtonTextOnly(int id, int xPos, int yPos, int width, int hight, String displayString, String linkedPage, int colour) {
|
||||
super(id, xPos, yPos, width, hight, displayString);
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
this.textColour = colour;
|
||||
}
|
||||
@Override
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY)
|
||||
{
|
||||
if (this.visible)
|
||||
{
|
||||
FontRenderer fontrenderer = minecraft.fontRendererObj;
|
||||
minecraft.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY) {
|
||||
if (this.visible) {
|
||||
FontRenderer fontrenderer = minecraft.fontRendererObj;
|
||||
minecraft.getTextureManager().bindTexture(buttonTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
String trimmedDisplayString = displayString;
|
||||
if (fontrenderer.getStringWidth(displayString) > width + 30 && !this.hovered)
|
||||
{
|
||||
int energencyBreak = 0;
|
||||
while (fontrenderer.getStringWidth(trimmedDisplayString) * 0.7 > width - 5)
|
||||
{
|
||||
trimmedDisplayString = trimmedDisplayString.substring(0, trimmedDisplayString.length() - 1);
|
||||
energencyBreak++;
|
||||
if (energencyBreak > 100)
|
||||
break;
|
||||
}
|
||||
trimmedDisplayString += "...";
|
||||
}
|
||||
|
||||
String trimmedDisplayString = displayString;
|
||||
if (fontrenderer.getStringWidth(displayString) > width + 30 && !this.hovered) {
|
||||
int energencyBreak = 0;
|
||||
while (fontrenderer.getStringWidth(trimmedDisplayString) * 0.7 > width - 5) {
|
||||
trimmedDisplayString = trimmedDisplayString.substring(0, trimmedDisplayString.length() - 1);
|
||||
energencyBreak++;
|
||||
if (energencyBreak > 100) break;
|
||||
}
|
||||
trimmedDisplayString += "...";
|
||||
}
|
||||
if (this.hovered)
|
||||
{
|
||||
trimmedDisplayString = TextFormatting.BOLD + "" + TextFormatting.ITALIC + trimmedDisplayString;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
drawTexturedModalRect(xPosition + (int) (xPosition * 0.01), yPosition + (int) (yPosition * 0.01), 0, 46,
|
||||
(int) (fontrenderer.getStringWidth(trimmedDisplayString) * 0.72) + 2, 8);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.7F, 0.7F, 1);
|
||||
fontrenderer.drawString(trimmedDisplayString, (int) (xPosition * 1.45),
|
||||
(int) ((yPosition + (height - 8) / 2) * 1.45), Color.WHITE.getRGB());
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.hovered) {
|
||||
trimmedDisplayString = TextFormatting.BOLD + "" + TextFormatting.ITALIC + trimmedDisplayString;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
drawTexturedModalRect(xPosition + (int) (xPosition * 0.01), yPosition + (int) (yPosition * 0.01), 0, 46, (int) (fontrenderer.getStringWidth(trimmedDisplayString) * 0.72) + 2, 8);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.7F, 0.7F, 1);
|
||||
fontrenderer.drawString(trimmedDisplayString, (int) (xPosition * 1.45), (int) ((yPosition + (height - 8) / 2) * 1.45), Color.WHITE.getRGB());
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getIsHovering() {
|
||||
return hovered;
|
||||
}
|
||||
public boolean getIsHovering()
|
||||
{
|
||||
return hovered;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue