Interface HasDrawable
- All Known Implementing Classes:
ExtensibleTextFieldWidget,FancyButtonWidget,IconWidget,ResetConfigWidget,TextFieldWidgetMixin
public interface HasDrawable
-
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(int mouseX, int mouseY) Use this to render your drawable on the screen.voidkeyPressed(char character, int key) Called whenever a key is pressed.voidmouseClicked(int mouseX, int mouseY, int button) Note: This is called any time the mouse is clicked.voidsetID(int id) Called when the config category is adding the drawable.voidsetXYWH(int x, int y, int width, int height) Called when setting the drawable position.voidtick()Called every frame.
-
Method Details
-
draw
void draw(int mouseX, int mouseY) Use this to render your drawable on the screen. -
mouseClicked
void mouseClicked(int mouseX, int mouseY, int button) Note: This is called any time the mouse is clicked. Check the button ID if you want to only do stuff with your button. -
setXYWH
void setXYWH(int x, int y, int width, int height) Called when setting the drawable position. X and Y is the top left corner. -
tick
void tick()Called every frame. -
keyPressed
void keyPressed(char character, int key) Called whenever a key is pressed. -
setID
void setID(int id) Called when the config category is adding the drawable.
-