Package net.storm.sdk.interact.builder
Class MenuFactory
java.lang.Object
net.storm.sdk.interact.builder.MenuFactory
Factory class for creating menu builders to interact with game entities.
MenuFactory provides a fluent API for constructing menu interactions with various game entities including:
- Players and NPCs (actors)
- Inventory, equipment, and bank items
- Tile objects and ground items
- Widgets
Each builder returned allows for customizing the interaction before executing it.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemMenuBuilderbankInventoryItem(int itemId, int slot) Creates a menu builder for interacting with an item in the bank's inventory panel.static ItemMenuBuilderbankItem(int itemId, int slot) Creates a menu builder for interacting with an item in the bank.static ItemMenuBuilderequipmentItem(int itemId, EquipmentSlot slot) Creates a menu builder for interacting with an equipped item.static ItemMenuBuilderinventoryItem(int itemId, int slot) Creates a menu builder for interacting with an inventory item.static ItemMenuBuilderitem(int itemId, int slot, int widgetId) Creates a menu builder for interacting with an item in a specific widget.static ActorMenuBuildernpc(int index) Creates a menu builder for interacting with an NPC.static ActorMenuBuilderplayer(int index) Creates a menu builder for interacting with a player.static TileEntityMenuBuildertileItem(int itemId, int sceneX, int sceneY) Creates a menu builder for interacting with a ground item.static TileEntityMenuBuildertileObject(int objectId, int sceneX, int sceneY) Creates a menu builder for interacting with a tile object (game object, wall, etc.).static WidgetMenuBuilderwidget(int widgetId) Creates a menu builder for interacting with a widget.
-
Constructor Details
-
MenuFactory
public MenuFactory()
-
-
Method Details
-
player
Creates a menu builder for interacting with a player.- Parameters:
index- the player's index in the player list- Returns:
- a menu builder for the player
-
npc
Creates a menu builder for interacting with an NPC.- Parameters:
index- the NPC's index in the NPC list- Returns:
- a menu builder for the NPC
-
item
Creates a menu builder for interacting with an item in a specific widget.- Parameters:
itemId- the item's IDslot- the slot index within the widgetwidgetId- the widget's ID containing the item- Returns:
- a menu builder for the item
-
inventoryItem
Creates a menu builder for interacting with an inventory item.- Parameters:
itemId- the item's IDslot- the inventory slot index (0-27)- Returns:
- a menu builder for the inventory item
-
equipmentItem
Creates a menu builder for interacting with an equipped item.- Parameters:
itemId- the item's IDslot- the equipment slot- Returns:
- a menu builder for the equipped item
-
bankItem
Creates a menu builder for interacting with an item in the bank.- Parameters:
itemId- the item's IDslot- the bank slot index- Returns:
- a menu builder for the bank item
-
bankInventoryItem
Creates a menu builder for interacting with an item in the bank's inventory panel.- Parameters:
itemId- the item's IDslot- the inventory slot index while bank is open- Returns:
- a menu builder for the bank inventory item
-
tileObject
Creates a menu builder for interacting with a tile object (game object, wall, etc.).- Parameters:
objectId- the object's IDsceneX- the X coordinate in the scenesceneY- the Y coordinate in the scene- Returns:
- a menu builder for the tile object
-
tileItem
Creates a menu builder for interacting with a ground item.- Parameters:
itemId- the item's IDsceneX- the X coordinate in the scene where the item is locatedsceneY- the Y coordinate in the scene where the item is located- Returns:
- a menu builder for the ground item
-
widget
Creates a menu builder for interacting with a widget.- Parameters:
widgetId- the widget's packed ID (group invalid input: '<'invalid input: '<' 16 | child)- Returns:
- a menu builder for the widget
-