Created dummy GuiOverlayElement interface for ComposedElement to determine which Elements to draw last
Added methods to retrieve position and size from a GuiElement Added draw() method with option to override hovered boolean to GuiElement interface and implemented it. This is required for GuiAdvancedButtons which would be tinted blue (as if hovered) even though an overlying GuiElement (e.g. GuiDropdown) was hovered
This commit is contained in:
@@ -28,6 +28,11 @@ public class GuiString extends Gui implements GuiElement {
|
||||
this.getContent = getContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Minecraft mc, int mouseX, int mouseY, boolean hovered) {
|
||||
draw(mc, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Minecraft mc, int mouseX, int mouseY) {
|
||||
String text;
|
||||
@@ -87,4 +92,24 @@ public class GuiString extends Gui implements GuiElement {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int xPos() {
|
||||
return positionX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int yPos() {
|
||||
return positionY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int width() {
|
||||
return getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int height() {
|
||||
return Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user