Package net.storm.api.widgets
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
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 TypeMethodDescriptionvoidCloses 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.Gets the first widget in a group matching a filter.default IWidgetget(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.getChildren(IWidget widget, Predicate<IWidget> filter) Gets all children of a widget matching a filter.getChildren(InterfaceAddress interfaceAddress, Predicate<IWidget> filter) Deprecated, for removal: This API element is subject to removal in a future version.booleanisVisible(int component) Checks if a widget is currently visible by packed component ID.booleanisVisible(int group, int id) Checks if a widget is currently visible by group and component ID.booleanisVisible(int group, int id, int child) Checks if a widget is currently visible by group, component, and child ID.booleanChecks if a widget is currently visible.default booleanisVisible(InterfaceAddress interfaceAddress) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
getAll
Gets all widgets in a group.- Parameters:
group- the widget group ID- Returns:
- list of widgets in the group (may be empty)
-
get
Gets a widget by group and component ID.- Parameters:
group- the widget group IDid- the component ID within the group- Returns:
- the widget, or null if not found
-
get
Gets a widget by group, component, and child ID.- Parameters:
group- the widget group IDid- the component ID within the groupchild- the child ID within the component- Returns:
- the widget, or null if not found
-
get
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, 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
Gets the first widget in a group matching a filter.- Parameters:
group- the widget group IDfilter- the filter predicate- Returns:
- the first matching widget, or null if none found
-
getChild
-
isVisible
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 IDid- 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 IDid- the component IDchild- 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, 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
Gets all children of a widget matching a filter.- Parameters:
widget- the parent widgetfilter- the filter predicate- Returns:
- list of matching child widgets (may be empty)
-
getChildren
Gets all children of a widget matching a filter by group and component ID.- Parameters:
group- the widget group IDid- the component IDfilter- the filter predicate- Returns:
- list of matching child widgets (may be empty)
-
getChildren
Gets all children of a widget matching a filter by group, component, and child ID.- Parameters:
group- the widget group IDid- the component IDchild- the child IDfilter- the filter predicate- Returns:
- list of matching child widgets (may be empty)
-
getChildren
Gets all children of a widget matching a filter by packed component ID.- Parameters:
component- the packed component IDfilter- 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 addressfilter- 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.
-