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:
trotFunky 2025-05-28 19:06:48 +01:00
parent 16e1eab24b
commit e30a97d036
6 changed files with 46 additions and 0 deletions

View file

@ -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,