Class AbstractPressableButtonWidget

All Implemented Interfaces:
Drawable, Element
Direct Known Subclasses:
BeaconScreen.BaseButtonWidget, ButtonWidget, CheckboxWidget

@Environment(CLIENT)
public abstract class AbstractPressableButtonWidget
extends AbstractButtonWidget
  • Constructor Details

    • AbstractPressableButtonWidget

      public AbstractPressableButtonWidget​(int x, int y, int width, int height, Text message)
  • Method Details

    • onPress

      public abstract void onPress()
    • onClick

      public void onClick​(double mouseX, double mouseY)
      Overrides:
      onClick in class AbstractButtonWidget
    • keyPressed

      public boolean keyPressed​(int keyCode, int scanCode, int modifiers)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Parameters:
      keyCode - the named key code of the event as described in the GLFW class
      scanCode - the unique/platform-specific scan code of the keyboard input
      modifiers - a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Keyboard.onKey(long, int, int, int, int), GLFW.GLFW_KEY_Q, GLFWKeyCallbackI.invoke(long, int, int, int, int)