public class Element<T extends net.minecraft.client.gui.GuiScreen>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ColorScheme |
DEFAULT |
| Constructor and Description |
|---|
Element(T gui,
float posX,
float posY,
int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawOutline(double x,
double y,
double width,
double height,
int color,
double outlineSize) |
protected void |
drawRectangle(double x,
double y,
double width,
double height,
int color) |
int |
drawString(java.lang.String string,
float x,
float y,
int color,
boolean shadow) |
protected void |
drawTexturedRectangle(double x,
double y,
double width,
double height,
int color) |
protected void |
endScissor() |
java.util.List<Element<T>> |
getChildren() |
ColorScheme |
getColorScheme() |
T |
getGUI() |
int |
getHeight() |
Element<T> |
getParent() |
float |
getPosX() |
float |
getPosY() |
int |
getWidth() |
void |
init() |
boolean |
isEnabled() |
protected boolean |
isSelected(float mouseX,
float mouseY) |
boolean |
isVisible() |
boolean |
keyPressed(char character,
int key) |
boolean |
mouseClicked(float mouseX,
float mouseY,
int button) |
boolean |
mouseDragged(float mouseX,
float mouseY,
int button,
long timeSinceClick) |
boolean |
mouseReleased(float mouseX,
float mouseY,
int button) |
boolean |
mouseScrolled(float mouseX,
float mouseY,
int amount) |
void |
render(float mouseX,
float mouseY,
float partialTicks) |
void |
setEnabled(boolean enabled) |
void |
setHeight(int height) |
void |
setPosX(float posX) |
void |
setPosY(float posY) |
void |
setVisible(boolean visible) |
void |
setWidth(int width) |
protected void |
startScissor() |
void |
update() |
Element<T> |
withColorScheme(ColorScheme colorScheme) |
Element<T> |
withParent(Element<T> parent) |
public static final ColorScheme DEFAULT
public Element(T gui, float posX, float posY, int width, int height)
public void init()
public void update()
public void render(float mouseX,
float mouseY,
float partialTicks)
public boolean mouseClicked(float mouseX,
float mouseY,
int button)
public boolean mouseDragged(float mouseX,
float mouseY,
int button,
long timeSinceClick)
public boolean mouseReleased(float mouseX,
float mouseY,
int button)
public boolean keyPressed(char character,
int key)
public boolean mouseScrolled(float mouseX,
float mouseY,
int amount)
protected boolean isSelected(float mouseX,
float mouseY)
public Element<T> withColorScheme(ColorScheme colorScheme)
public T getGUI()
public ColorScheme getColorScheme()
public float getPosX()
public void setPosX(float posX)
public float getPosY()
public void setPosY(float posY)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean isVisible()
public void setVisible(boolean visible)
protected void drawRectangle(double x,
double y,
double width,
double height,
int color)
protected void drawTexturedRectangle(double x,
double y,
double width,
double height,
int color)
protected void drawOutline(double x,
double y,
double width,
double height,
int color,
double outlineSize)
protected void startScissor()
protected void endScissor()
public int drawString(java.lang.String string,
float x,
float y,
int color,
boolean shadow)