Interface HasDrawable

All Known Implementing Classes:
ExtensibleTextFieldWidget, FancyButtonWidget, IconWidget, ResetConfigWidget, TextFieldWidgetMixin

public interface HasDrawable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(int mouseX, int mouseY)
    Use this to render your drawable on the screen.
    void
    keyPressed(char character, int key)
    Called whenever a key is pressed.
    void
    mouseClicked(int mouseX, int mouseY, int button)
    Note: This is called any time the mouse is clicked.
    void
    setID(int id)
    Called when the config category is adding the drawable.
    void
    setXYWH(int x, int y, int width, int height)
    Called when setting the drawable position.
    void
    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.