Files
asc-starwars-style-journal/src/scripts/asc-starwars.js
Anthony Correa c52e0aa9ab Enhance Star Wars Journal with custom chat styles and UI tweaks
- Added a hook to apply custom CSS classes to chat messages based on flags in `asc-starwars.js`.
- Updated `StarWarsStyleJournalSheet` to apply the 'asc-starwars' class and ensure the journal renders in a collapsed state by default.
- Enhanced `asc-starwars-journal.css` to improve visual consistency:
  - Applied starry background and Star Wars-themed fonts to journal entries and chat messages.
  - Adjusted layout, padding, and width for better readability.
  - Added rounded borders, padding, and margins to message content for a polished look.

These updates improve the thematic immersion and UI aesthetics of the Star Wars journal and chat features.
2025-02-05 11:10:38 -06:00

18 lines
631 B
JavaScript

import {StarWarsStyleJournalSheet} from "./journalSheets.js"
// ui.notifications.info
// Register the custom journal sheet
Hooks.once('ready', () => {
console.log('ASC Star Wars Style Journal | Registering custom sheet...');
Journal.registerSheet('asc-starwars-style-journal', StarWarsStyleJournalSheet, {
label: 'Star Wars Style Journal',
makeDefault: false // Set to true if you want this as the default
});
});
Hooks.on("renderChatMessage", (message, html, data) => {
let customClass = message.getFlag("asc-starwars-style-journal", "customClass");
if (customClass) {
html.addClass(customClass);
}
});