Classes
PopupMenu
This class is for interacting with context menus (i.e. when you single click on an item or your self). PopupMenu
is available via the popupMenu
variable on the global scope.
Example
ts
popupMenu.request(player.serial);
popupMenu.waitUntilOpen(1000); // Wait 1 second for the menu to open
popupMenu.reply(0); // 0 is first item, second item is 1, etc.
Properties
Methods
reply()
ts
reply(index: number): void
Replies to a popup menu. Index 0 is the first item.
Parameters
Parameter | Type | Description |
---|---|---|
index | number |
request()
ts
request(serial: number, waitMs?: number): undefined | boolean
Requests a popup menu for the given object
Parameters
Parameter | Type | Description |
---|---|---|
serial | number | |
waitMs ? | number |
Returns
undefined
| boolean
waitForContent()
ts
waitForContent(timeoutMs?: number): null | object
Wait until a popup context menu is open, and return its content or null
Parameters
Parameter | Type | Description |
---|---|---|
timeoutMs ? | number |
Returns
null
| object