Class GUITextButton

All Implemented Interfaces:
GUISelectable, GUIElement, KeyPressedHandler, ImageObserver, MenuContainer, Serializable

public class GUITextButton extends AbstractButton implements GUISelectable
A GUIElement that implements a button. The button shows a background image and a text. The background image consists of three parts: left, middle, and right. Left and right are fixed size image, the middle part is clipped or repeated to the actual with of the button. underlying images.
See Also:
  • Constructor Details

    • GUITextButton

      public GUITextButton(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, @NotNull @NotNull ButtonImages up, @NotNull @NotNull ButtonImages down, @NotNull @NotNull String text, @NotNull @NotNull Font font, @NotNull @NotNull Color color, @NotNull @NotNull Color colorSelected, @NotNull @NotNull Color colorDisabled, boolean autoRepeat, @NotNull @NotNull CommandList commandList, @NotNull @NotNull GuiFactory guiFactory, @NotNull @NotNull NewCharModel newCharModel, @NotNull @NotNull KeybindingsManager keybindingsManager)
      Creates a new instance.
      Parameters:
      tooltipManager - the tooltip manager to update
      elementListener - the element listener to notify
      name - the name of this element
      up - the images comprising the "up" button state
      down - the images comprising the "down" button state
      text - the button text
      font - the font to use
      color - the text color
      colorSelected - the text color when selected
      colorDisabled - the text color when disabled; takes precedence over colorSelected
      autoRepeat - whether the button should autorepeat while being pressed
      commandList - the commands to execute when the button is selected
      guiFactory - the global GUI factory instance
      newCharModel - the global new char model instance
      keybindingsManager - the global key bindings manager instance
  • Method Details