Add new tools to pre-select players
Selecting all present players can be tedious, especially if they are many or when multiple messagess need to be sent. Add two new buttons to the toolbar that allow pre-filling the form with all connected players, or all players. Add translations and icons for those new tools.
This commit is contained in:
parent
16e1eab24b
commit
e30a97d036
6 changed files with 46 additions and 0 deletions
|
@ -332,6 +332,28 @@ function main() {
|
|||
title: "MM.UI.ToolbarCategory",
|
||||
icon: "mm-chat-bubble",
|
||||
tools: [{
|
||||
name: "send-message-to-all",
|
||||
title: "MM.UI.ToolbarSendMessageToAll",
|
||||
button: true,
|
||||
visible: true,
|
||||
icon: "mm-bubble-above-three-players",
|
||||
onClick: () => send_message_dialog({
|
||||
recipients: game.users.players.map((user) => user.id)
|
||||
})
|
||||
},
|
||||
{
|
||||
name: "send-message-to-connected",
|
||||
title: "MM.UI.ToolbarSendMessageToConnected",
|
||||
button: true,
|
||||
visible: true,
|
||||
icon: "mm-bubble-above-two-players",
|
||||
onClick: () => send_message_dialog({
|
||||
recipients: game.users.players
|
||||
.filter((user) => user.active)
|
||||
.map((user) => user.id)
|
||||
})
|
||||
},
|
||||
{
|
||||
name: "send-message",
|
||||
title: "MM.UI.ToolbarSendMessage",
|
||||
button: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue