Class MenuOption.Builder

java.lang.Object
dev.twilite.game.menu.MenuOption.Builder
Enclosing class:
MenuOption

public static class MenuOption.Builder extends Object
Builder for MenuOption.
  • Method Details

    • text

      public MenuOption.Builder text(String text)
      Sets the visible option text.
    • type

      public MenuOption.Builder type(ActionType type)
      Sets the action type/opcode.
    • id

      public MenuOption.Builder id(int id)
      Sets the primary action id.
    • params

      public MenuOption.Builder params(int p1, int p2)
      Sets the action parameter pair.
    • world

      public MenuOption.Builder world(int world)
      Sets the world id used by world-aware actions.
    • typecode

      public MenuOption.Builder typecode(Typecode typecode)
      Sets the packed entity typecode source.
    • itemId

      public MenuOption.Builder itemId(int itemId)
      Sets the subject item id.
    • flags

      public MenuOption.Builder flags(int flags)
      Sets subject flags, such as stack size or component flags depending on the action.
    • component

      public MenuOption.Builder component(long component)
      Sets the native component shared-pointer address for component actions.
    • clickBounds

      public MenuOption.Builder clickBounds(Rectangle clickBounds)
      Sets the component or screen bounds used for generated mouse movement before the action.
    • clickBounds

      public MenuOption.Builder clickBounds(Rectangle clickBounds, boolean visible)
      Sets the component or screen bounds used for generated mouse movement before the action.
    • build

      public MenuOption build()
      Builds the immutable option.