Package net.storm.api.interact.builder
Interface WidgetMenuBuilder
- All Superinterfaces:
MenuBuilder<WidgetMenuBuilder>
Specialized menu builder for widget (UI component) interactions.
This builder extends MenuBuilder to provide a fluent API for
constructing menu actions that target UI widgets. Widgets are the
building blocks of the game's interface system.
Widget types include:
- Buttons - Clickable actions like spells, prayers, abilities
- Dialog options - Conversation choices with NPCs
- Interface controls - Tabs, close buttons, scroll bars
- Container slots - Inventory, bank, shop interfaces
Example usage:
// Click a dialog option
AutomatedMenu menu = menuFactory.widget(dialogWidgetId)
.childId(optionIndex)
.option("Continue")
.resume(true)
.build(clickPoint);
// Cast a spell
AutomatedMenu spellMenu = menuFactory.widget(spellWidgetId)
.option("Cast")
.build(clickPoint);
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSets the child widget ID for nested widget interactions.resume(boolean resume) Sets whether this widget action should resume a paused dialog.Methods inherited from interface net.storm.api.interact.builder.MenuBuilder
actionIndex, build, build, castSpell, identifier, interactMethod, itemId, opcode, option, param0, param1, target, useItem, worldViewId
-
Method Details
-
childId
Sets the child widget ID for nested widget interactions.Many widgets contain child components. This method specifies which child widget within the parent should be targeted for the interaction.
- Parameters:
childId- the child widget index within the parent, or null to target the parent- Returns:
- this builder for method chaining
-
resume
Sets whether this widget action should resume a paused dialog.When interacting with dialog widgets (e.g., NPC conversations), setting resume to
trueindicates that this action continues a dialog sequence rather than starting a new interaction.- Parameters:
resume-trueto resume dialog,falseotherwise- Returns:
- this builder for method chaining
-