Interface WidgetMenuBuilder

All Superinterfaces:
MenuBuilder<WidgetMenuBuilder>

public interface WidgetMenuBuilder extends 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 Details

    • childId

      WidgetMenuBuilder childId(Integer 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

      WidgetMenuBuilder resume(boolean resume)
      Sets whether this widget action should resume a paused dialog.

      When interacting with dialog widgets (e.g., NPC conversations), setting resume to true indicates that this action continues a dialog sequence rather than starting a new interaction.

      Parameters:
      resume - true to resume dialog, false otherwise
      Returns:
      this builder for method chaining