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
31 lines
805 B
Java
31 lines
805 B
Java
package eu.crushedpixel.replaymod.gui.elements;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
public interface GuiElement {
|
|
|
|
void draw(Minecraft mc, int mouseX, int mouseY);
|
|
|
|
void draw(Minecraft mc, int mouseX, int mouseY, boolean hovered);
|
|
|
|
void drawOverlay(Minecraft mc, int mouseX, int mouseY);
|
|
|
|
boolean isHovering(int mouseX, int mouseY);
|
|
|
|
int xPos();
|
|
int yPos();
|
|
int width();
|
|
int height();
|
|
|
|
boolean mouseClick(Minecraft mc, int mouseX, int mouseY, int button);
|
|
void mouseDrag(Minecraft mc, int mouseX, int mouseY, int button);
|
|
void mouseRelease(Minecraft mc, int mouseX, int mouseY, int button);
|
|
|
|
void buttonPressed(Minecraft mc, int mouseX, int mouseY, char key, int keyCode);
|
|
|
|
void tick(Minecraft mc);
|
|
|
|
void setElementEnabled(boolean enabled);
|
|
|
|
}
|