TheWhiteWolves / MapChange

Roll20 API Script to allow moving players between pages.
2 stars 3 forks source link

!mc menu #4

Open TheWhiteWolves opened 8 years ago

TheWhiteWolves commented 8 years ago

Add in a menu command, this command will send a menu to the chat with a list of the map names and buttons to allow a player to use this to move between pages instead of either manually sending the command or using a macro.

public maps will display for players and GMs private maps will only display for GMs

When the command is used a table will be generated and sent to the player, following the bellow example:

Player View:

Map Link
Caves [ ]
Forest [ ]
Mountain [ ]

GM View:

Public Map Link
Caves [ ]
Forest [ ]
Mountain [ ]
Private Map Link
[GM] Dungeon [ ]
[GM] Castle [ ]
[GM] Secret Room [ ]

[ ] is a placeholder for a button in the chat

TheWhiteWolves commented 8 years ago

https://wiki.roll20.net/API:Chat#API_Command_Buttons

TheWhiteWolves commented 8 years ago

Done first pass at this (see commit 232198546e04f56af3aa9e790e8030f729a141e7).

At the moment this has no custom styling as whispering does not support setting the html yourself, this can only be done through /direct but this sends the message to all players which we do not want to happen.

Current Version Example Example

TheWhiteWolves commented 8 years ago

Idea for enhancement:

Add a parameter to the menu command to allow GM's to display only one of the map files. e.g. "!mc menu --display public" will only display the public maps.

By default it will still display all the map files to the GM.

TheWhiteWolves commented 8 years ago

Filter completed in commit 7bb48133e9feb3bcb89a8a5e0104f72eda4a7d54

Also refactored the menu in commit 53fc485adddc8b3e2d2c991e1f2ae93ea7c90463 so that in now looks like this (I need to decide which formatting is better):

Normal: image Itallic: image Bold and Itallic: image Bold: image

TheWhiteWolves commented 8 years ago

Need to work on some better styling across the board