menu command api
This commit is contained in:
parent
979ae73d8d
commit
ba1bcf226a
9 changed files with 381 additions and 252 deletions
|
@ -65,3 +65,26 @@ WA.room.onLeaveZone('myZone', () => {
|
|||
helloWorldPopup.close();
|
||||
});
|
||||
```
|
||||
|
||||
### register additional menu entries
|
||||
|
||||
adds an additional Entry to the main menu , these exist until the map is unloaded
|
||||
|
||||
|
||||
```typescript
|
||||
registerMenuCommand(menuCommand: string, callback: (menuCommand: string) => void): void
|
||||
```
|
||||
Example:
|
||||
|
||||
|
||||
```javascript
|
||||
|
||||
WA.registerMenuCommand("test", () => {
|
||||
WA.sendChatMessage("test clicked", "menu cmd")
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
<div class="col">
|
||||
<img src="./assets/menu-command.png" class="figure-img img-fluid rounded" alt="" />
|
||||
</div>
|
BIN
docs/maps/assets/menu-command.png
Normal file
BIN
docs/maps/assets/menu-command.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue