Update system/L5R-Header.jpg, system/system.json, system/lang/pt-BR.json, system/lang/en.json, system/lang/fr.json, system/l5r-ui/css/cursor.css, system/l5r-ui/css/l5rui.css, system/l5r-ui/scripts/l5rui-chat-color.js, system/l5r-ui/scripts/help/l5rui-help.js, system/l5r-ui/scripts/help/openDTR.js, system/l5r-ui/scripts/help/openEN.js, system/l5r-ui/scripts/help/openES.js, system/l5r-ui/scripts/help/openFR.js, system/l5r-ui/ui/buttons/button-blue.png, system/l5r-ui/ui/buttons/button-green.png, system/l5r-ui/ui/buttons/button-grey.png, system/l5r-ui/ui/buttons/button-grey-light.png, system/l5r-ui/ui/buttons/button-red.png, system/l5r-ui/ui/cursors/drag.png, system/l5r-ui/ui/cursors/normal.png, system/l5r-ui/ui/cursors/pointer.png, system/l5r-ui/ui/frames/Chat-box.png, system/l5r-ui/ui/frames/chat-controls-border.png, system/l5r-ui/ui/frames/hotkeybox.png, system/l5r-ui/ui/frames/chat-texture.png, system/l5r-ui/ui/frames/hotkeybox-macro-list.png, system/l5r-ui/ui/frames/players-border.png, system/l5r-ui/ui/logo/l5r-logo.png, system/l5r-ui/ui/sidebar/sidebar_button-actors.png, system/l5r-ui/ui/sidebar/sidebar_button-background.png, system/l5r-ui/ui/sidebar/sidebar_button-background_cyan.png, system/l5r-ui/ui/sidebar/sidebar_button-background_green.png, system/l5r-ui/ui/sidebar/sidebar_button-background_grey.png, system/l5r-ui/ui/sidebar/sidebar_button-background_red.png, system/l5r-ui/ui/sidebar/sidebar_button-chat.png, system/l5r-ui/ui/sidebar/sidebar_button-combat-tracker.png, system/l5r-ui/ui/sidebar/sidebar_button-compendium.png, system/l5r-ui/ui/sidebar/sidebar_button-footer-button.png, system/l5r-ui/ui/sidebar/sidebar_button-journal.png, system/l5r-ui/ui/sidebar/sidebar_button-object.png, system/l5r-ui/ui/sidebar/sidebar_button-playlist.png, system/l5r-ui/ui/sidebar/sidebar_button-rolltable.png, system/l5r-ui/ui/sidebar/sidebar_buttons.png, system/l5r-ui/ui/sidebar/sidebar_button-scenes.png, system/l5r-ui/ui/sidebar/sidebar_button-settings.png files
This commit is contained in:
49
system/l5r-ui/scripts/help/l5rui-help.js
Normal file
49
system/l5r-ui/scripts/help/l5rui-help.js
Normal file
@@ -0,0 +1,49 @@
|
||||
//fonctions et class déportées
|
||||
import { openES } from './openES.js';
|
||||
import { openDTR } from './openDTR.js';
|
||||
import { openFR } from './openFR.js';
|
||||
import { openEN } from './openEN.js';
|
||||
|
||||
Hooks.once("ready", async function() {
|
||||
//----------le menu liens externes
|
||||
let liensExt = new Dialog({
|
||||
title: "Besoin d'aide ?",
|
||||
content: "<p>Que voulez vous faire :</p>",
|
||||
buttons: {
|
||||
|
||||
one: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Accéder au site de Edge-Studio",
|
||||
callback: () => openES()
|
||||
},
|
||||
two: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Acheter un PDF du jeu ?",
|
||||
callback: () => openDTR()
|
||||
},
|
||||
three: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Rejoindre le Discord Francophone",
|
||||
callback: () => openFR()
|
||||
},
|
||||
four: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Discord Officiel FoundryVTT",
|
||||
callback: () => openEN()
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//------------message et logo dans console
|
||||
|
||||
//----logo image
|
||||
var logo = document.getElementById("logo");
|
||||
logo.setAttribute("src", "systems/l5r5e/l5r-ui/ui/logo/l5r-logo.png");
|
||||
|
||||
//--------------ouvrir le menu lien sur click logo
|
||||
logo.setAttribute("title", "Aide en Ligne");
|
||||
logo.addEventListener("click", function() {
|
||||
liensExt.render(true);
|
||||
});
|
||||
});
|
||||
4
system/l5r-ui/scripts/help/openDTR.js
Normal file
4
system/l5r-ui/scripts/help/openDTR.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export function openDTR() {
|
||||
ui.notifications.info("votre navigateur va ouvrir le site DriveThruRpg de EDGE STUDIO");
|
||||
var windowObjectReference = window.open("https://www.drivethrurpg.com/browse/pub/17946/EDGE-Studio?src=browse17946/", "_blank");
|
||||
};
|
||||
4
system/l5r-ui/scripts/help/openEN.js
Normal file
4
system/l5r-ui/scripts/help/openEN.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export function openEN() {
|
||||
ui.notifications.info("Votre navigateur va s'ouvrir sur le discord officiel de Foundry");
|
||||
var windowObjectReference = window.open("https://discordapp.com/invite/DDBZUDf", "_blank");
|
||||
};
|
||||
4
system/l5r-ui/scripts/help/openES.js
Normal file
4
system/l5r-ui/scripts/help/openES.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export function openES() {
|
||||
ui.notifications.info("votre navigateur va ouvrir le site de EDGE STUDIO");
|
||||
var windowObjectReference = window.open("https://edge-studio.net/", "_blank");
|
||||
};
|
||||
5
system/l5r-ui/scripts/help/openFR.js
Normal file
5
system/l5r-ui/scripts/help/openFR.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export function openFR() {
|
||||
ui.notifications.info("votre navigateur va ouvrir le discord francophone de foundry");
|
||||
var windowObjectReference = window.open("https://discord.gg/pPSDNJk", "_blank");
|
||||
|
||||
};
|
||||
124
system/l5r-ui/scripts/l5rui-chat-color.js
Normal file
124
system/l5r-ui/scripts/l5rui-chat-color.js
Normal file
@@ -0,0 +1,124 @@
|
||||
Hooks.on('init', () => {
|
||||
// Register module settings.
|
||||
game.settings.register('l5r-ui', 'icBgColor', {
|
||||
name: game.i18n.localize('IC.BG.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#D3E5F5",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'icTextColor', {
|
||||
name: game.i18n.localize('IC.TEXT.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#000000",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'emoteBgColor', {
|
||||
name: game.i18n.localize('EMOTE.BG.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#D1F5D1",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'emoteTextColor', {
|
||||
name: game.i18n.localize('EMOTE.TEXT.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#000000",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'rollBgColor', {
|
||||
name: game.i18n.localize('ROLL.BG.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#E6BB81",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'rollTextColor', {
|
||||
name: game.i18n.localize('ROLL.TEXT.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#000000",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'otherBgColor', {
|
||||
name: game.i18n.localize('OTHER.BG.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#DBD9CD",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'otherTextColor', {
|
||||
name: game.i18n.localize('OTHER.TEXT.COLOR'),
|
||||
hint: game.i18n.localize('HEXA.COLOR'),
|
||||
default: "#000000",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
game.settings.register('l5r-ui', 'defaultChatPrefix', {
|
||||
name: game.i18n.localize('DEF.CHAT.PREF'),
|
||||
hint: game.i18n.localize('SPE.CHAT.PREF'),
|
||||
default: "",
|
||||
type: String,
|
||||
scope: 'client',
|
||||
config: true
|
||||
});
|
||||
});
|
||||
|
||||
Hooks.on("renderChatLog", (log, html) => {
|
||||
// Prepend inline CSS to the chatlog to style the chat messages.
|
||||
icBgColor = game.settings.get('l5r-ui', 'icBgColor');
|
||||
icTextColor = game.settings.get('l5r-ui', 'icTextColor');
|
||||
emoteBgColor = game.settings.get('l5r-ui', 'emoteBgColor');
|
||||
emoteTextColor = game.settings.get('l5r-ui', 'emoteTextColor');
|
||||
rollBgColor = game.settings.get('l5r-ui', 'rollBgColor');
|
||||
rollTextColor = game.settings.get('l5r-ui', 'rollTextColor');
|
||||
otherBgColor = game.settings.get('l5r-ui', 'otherBgColor');
|
||||
otherTextColor = game.settings.get('l5r-ui', 'otherTextColor');
|
||||
$("<style type='text/css'> #chat-log .message.ic { background: " + icBgColor+ "; color: " + icTextColor +
|
||||
" }\n #chat-log .message.ic .message-header { color: " + icTextColor +
|
||||
" }\n #chat-log .message.emote { background: " + emoteBgColor +
|
||||
"; color: " + emoteTextColor +
|
||||
" }\n #chat-log .message.emote .message-header { color: " + emoteTextColor +
|
||||
" }\n #chat-log .message.chatColorsRoll { background: " + rollBgColor +
|
||||
"; color: " + rollTextColor +
|
||||
" }\n #chat-log .message.chatColorsRoll .message-header { color: " + rollTextColor +
|
||||
" }\n #chat-log .message { background: " + otherBgColor +
|
||||
"; color: " + otherTextColor +
|
||||
" }\n #chat-log .message .message-header { color: " + otherTextColor +
|
||||
"; } </style>").prependTo(html);
|
||||
});
|
||||
|
||||
Hooks.on("chatMessage", (chatLog, message, chatData) => {
|
||||
if (game.settings.get('l5r-ui', 'defaultChatPrefix')) {
|
||||
prefix = game.settings.get('l5r-ui', 'defaultChatPrefix');
|
||||
|
||||
// Check if the message begins with any command.
|
||||
let [command, match] = chatLog.constructor.parse(message);
|
||||
|
||||
if ( command === "none" ) {
|
||||
// If there is no command, insert the prefix and reprocess.
|
||||
chatLog.processMessage(prefix + " " + message);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Otherwise do nothing.
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
Hooks.on("renderChatMessage", (message, html, data) => {
|
||||
// Add extra CSS classes to rolls so we can style them.
|
||||
if (message.isRoll) {
|
||||
html.addClass("chatColorsRoll");
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user