Interface IWidgets


public interface IWidgets
Provides access to UI widgets and interface components.

Widgets represent all UI elements in the game, including:

  • Inventory and bank interfaces
  • Dialog boxes and chatbox
  • Game menus and settings
  • Skill interfaces and quest journals
  • Custom plugin overlays
Widgets are organized hierarchically by group, component, and child IDs.

Example usage:

 
 IWidgets widgets = Static.getWidgets();
 IWidget bankTitle = widgets.get(12, 3); // Bank interface title
 boolean isBankOpen = widgets.isVisible(12, 3);
 
 

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes all open interfaces.
    get(int component)
    Gets a widget by packed component ID.
    get(int group, int id)
    Gets a widget by group and component ID.
    get(int group, int id, int child)
    Gets a widget by group, component, and child ID.
    get(int group, Predicate<? super IWidget> filter)
    Gets the first widget in a group matching a filter.
    default IWidget
    get(InterfaceAddress interfaceAddress)
    Deprecated, for removal: This API element is subject to removal in a future version.
    getAll(int group)
    Gets all widgets in a group.
    getChild(int component, int child)
     
    getChildren(int group, int id, int child, Predicate<IWidget> filter)
    Gets all children of a widget matching a filter by group, component, and child ID.
    getChildren(int group, int id, Predicate<IWidget> filter)
    Gets all children of a widget matching a filter by group and component ID.
    getChildren(int component, Predicate<IWidget> filter)
    Gets all children of a widget matching a filter by packed component ID.
    Gets all children of a widget matching a filter.
    default List<IWidget>
    getChildren(InterfaceAddress interfaceAddress, Predicate<IWidget> filter)
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    isVisible(int component)
    Checks if a widget is currently visible by packed component ID.
    boolean
    isVisible(int group, int id)
    Checks if a widget is currently visible by group and component ID.
    boolean
    isVisible(int group, int id, int child)
    Checks if a widget is currently visible by group, component, and child ID.
    boolean
    Checks if a widget is currently visible.
    default boolean
    isVisible(InterfaceAddress interfaceAddress)
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getAll

      List<IWidget> getAll(int group)
      Gets all widgets in a group.
      Parameters:
      group - the widget group ID
      Returns:
      list of widgets in the group (may be empty)
    • get

      IWidget get(int group, int id)
      Gets a widget by group and component ID.
      Parameters:
      group - the widget group ID
      id - the component ID within the group
      Returns:
      the widget, or null if not found
    • get

      IWidget get(int group, int id, int child)
      Gets a widget by group, component, and child ID.
      Parameters:
      group - the widget group ID
      id - the component ID within the group
      child - the child ID within the component
      Returns:
      the widget, or null if not found
    • get

      IWidget get(int component)
      Gets a widget by packed component ID.

      The packed format combines group and component into a single integer.

      Parameters:
      component - the packed component ID
      Returns:
      the widget, or null if not found
    • get

      @Deprecated(forRemoval=true) default IWidget get(InterfaceAddress interfaceAddress)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a widget by interface address.
      Parameters:
      interfaceAddress - the interface address
      Returns:
      the widget, or null if not found
    • get

      IWidget get(int group, Predicate<? super IWidget> filter)
      Gets the first widget in a group matching a filter.
      Parameters:
      group - the widget group ID
      filter - the filter predicate
      Returns:
      the first matching widget, or null if none found
    • getChild

      IWidget getChild(@Component int component, int child)
    • isVisible

      boolean isVisible(IWidget widget)
      Checks if a widget is currently visible.
      Parameters:
      widget - the widget to check
      Returns:
      true if the widget is visible, false otherwise
    • isVisible

      boolean isVisible(int group, int id)
      Checks if a widget is currently visible by group and component ID.
      Parameters:
      group - the widget group ID
      id - the component ID
      Returns:
      true if the widget is visible, false otherwise
    • isVisible

      boolean isVisible(int group, int id, int child)
      Checks if a widget is currently visible by group, component, and child ID.
      Parameters:
      group - the widget group ID
      id - the component ID
      child - the child ID
      Returns:
      true if the widget is visible, false otherwise
    • isVisible

      boolean isVisible(int component)
      Checks if a widget is currently visible by packed component ID.
      Parameters:
      component - the packed component ID
      Returns:
      true if the widget is visible, false otherwise
    • isVisible

      @Deprecated(forRemoval=true) default boolean isVisible(InterfaceAddress interfaceAddress)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if a widget is currently visible by interface address.
      Parameters:
      interfaceAddress - the interface address
      Returns:
      true if the widget is visible, false otherwise
    • getChildren

      List<IWidget> getChildren(IWidget widget, Predicate<IWidget> filter)
      Gets all children of a widget matching a filter.
      Parameters:
      widget - the parent widget
      filter - the filter predicate
      Returns:
      list of matching child widgets (may be empty)
    • getChildren

      List<IWidget> getChildren(int group, int id, Predicate<IWidget> filter)
      Gets all children of a widget matching a filter by group and component ID.
      Parameters:
      group - the widget group ID
      id - the component ID
      filter - the filter predicate
      Returns:
      list of matching child widgets (may be empty)
    • getChildren

      List<IWidget> getChildren(int group, int id, int child, Predicate<IWidget> filter)
      Gets all children of a widget matching a filter by group, component, and child ID.
      Parameters:
      group - the widget group ID
      id - the component ID
      child - the child ID
      filter - the filter predicate
      Returns:
      list of matching child widgets (may be empty)
    • getChildren

      List<IWidget> getChildren(int component, Predicate<IWidget> filter)
      Gets all children of a widget matching a filter by packed component ID.
      Parameters:
      component - the packed component ID
      filter - the filter predicate
      Returns:
      list of matching child widgets (may be empty)
    • getChildren

      @Deprecated(forRemoval=true) default List<IWidget> getChildren(InterfaceAddress interfaceAddress, Predicate<IWidget> filter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets all children of a widget matching a filter by interface address.
      Parameters:
      interfaceAddress - the interface address
      filter - the filter predicate
      Returns:
      list of matching child widgets (may be empty)
    • closeInterfaces

      void closeInterfaces()
      Closes all open interfaces.

      This simulates pressing the ESC key to close dialogs and interfaces.