Initial commit - v0.1.0

This is the initial version of the module, for Foundry v12.

It allows GMs to write and send messages to players via socketlib,
storing an history of those messages, and displaying them on the player's
side, with some potential flair, and some controls in the settings.

This *does not work* with Foundry v13, as the toolbar registration process
has changed.
This commit is contained in:
trotFunky 2025-05-12 21:26:21 +01:00
commit c83122548a
11 changed files with 1143 additions and 0 deletions

29
styles/mills_messages.css Normal file
View file

@ -0,0 +1,29 @@
/* For some reason toolbar icons work as classes ? */
.mm-chat-bubble {
display: inline-block;
width: 32px;
height: 32px;
background-size: cover;
cursor: pointer;
image-rendering: pixelated;
background-image: url("/modules/the-mills-messages/assets/chat_bubble.webp");
}
/*
* Override Foundry's `.application .scrollable`, whose right margin does not work
* with ProseMirror's editor internal divs which need a 0 right margin.
*/
.mm-send-dialog .scrollable {
margin-right: 0 !important;
padding-right: 0.2rem !important;
}
/* Prevent the message window from getting too big. */
.mm-dialog {
max-width: 60%;
}
/* Separator between messages from the same sender */
.mm-separator {
}