public class ComponentButton extends GuiComponent
| Modifier and Type | Field and Description |
|---|---|
boolean |
hasBackground |
int |
id |
boolean |
isVisible |
protected java.lang.String |
text |
colorButton, colorButtonUnselected, colorOutline, gui, guiColor, sizeX, sizeY, x, y| Constructor and Description |
|---|
ComponentButton(Gui gui,
int id,
int x,
int y,
int sizeX,
int sizeY,
java.lang.String text,
java.lang.String... hover) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String[] |
getHover() |
protected java.lang.String |
getText() |
boolean |
onMouseAction(IGameInstance game,
int button,
float x,
float y) |
boolean |
onPressed(IGameInstance game) |
void |
render(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g) |
void |
renderOverlay(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g) |
ComponentButton |
setHasBackground(boolean has) |
void |
setText(java.lang.String text) |
isMouseOver, isMouseOverPrioritized, onKeyboardAction, updatepublic final int id
public boolean hasBackground
public boolean isVisible
protected java.lang.String text
public ComponentButton(Gui gui, int id, int x, int y, int sizeX, int sizeY, java.lang.String text, java.lang.String... hover)
public void setText(java.lang.String text)
public ComponentButton setHasBackground(boolean has)
public void render(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g)
render in class GuiComponentprotected java.lang.String getText()
protected java.lang.String[] getHover()
public void renderOverlay(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g)
renderOverlay in class GuiComponentpublic boolean onMouseAction(IGameInstance game, int button, float x, float y)
onMouseAction in class GuiComponentpublic boolean onPressed(IGameInstance game)