mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 15:33:06 +00:00
Clean up widgets sheet - remove old textures and organize
This commit is contained in:
1 parent
941dc580fb
commit
eae3c8be49
17 files changed
+123
-48
No files matched your search
@@ -25,7 +25,7 @@ public class IconButtonEIO extends GuiButton {
|
||||
|
||||
protected IGuiScreen gui;
|
||||
|
||||
protected GuiToolTip toolTip;
|
||||
private GuiToolTip toolTip;
|
||||
private int marginY = 0;
|
||||
private int marginX = 0;
|
||||
|
||||
@@ -41,13 +41,17 @@ public class IconButtonEIO extends GuiButton {
|
||||
|
||||
public void setToolTip(String... tooltipText) {
|
||||
if(toolTip == null) {
|
||||
toolTip = new GuiToolTip(new Rectangle(xOrigin, yOrigin, width, height), tooltipText);
|
||||
toolTip = new GuiToolTip(getBounds(), tooltipText);
|
||||
//gui.addToolTip(toolTip);
|
||||
} else {
|
||||
toolTip.setToolTipText(tooltipText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public final Rectangle getBounds() {
|
||||
return new Rectangle(xOrigin, yOrigin, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
public void onGuiInit() {
|
||||
gui.addButton(this);
|
||||
if(toolTip != null) {
|
||||
@@ -102,6 +106,10 @@ public class IconButtonEIO extends GuiButton {
|
||||
public void setIcon(IconEIO icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public GuiToolTip getToolTip() {
|
||||
return toolTip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override this to handle mouse clicks with other buttons than the left
|
||||
|
||||
Reference in new issue
Block a user