Initial import with skill sheet working
This commit is contained in:
44
module/control-buttons.mjs
Normal file
44
module/control-buttons.mjs
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Menu spécifique au système
|
||||
*/
|
||||
export function initControlButtons() {
|
||||
CONFIG.Canvas.layers.tenebris = { layerClass: ControlsLayer, group: "primary" }
|
||||
|
||||
Hooks.on("getSceneControlButtons", (btns) => {
|
||||
let menu = []
|
||||
|
||||
menu.push({
|
||||
name: "fortune",
|
||||
title: game.i18n.localize("TENEBRIS.Fortune.title"),
|
||||
icon: "fa-solid fa-clover",
|
||||
button: true,
|
||||
onClick: () => {
|
||||
if (!foundry.applications.instances.has("tenebris-application-fortune")) {
|
||||
game.system.applicationFortune.render(true)
|
||||
} else game.system.applicationFortune.close()
|
||||
},
|
||||
})
|
||||
|
||||
if (game.user.isGM) {
|
||||
menu.push({
|
||||
name: "gm-manager",
|
||||
title: game.i18n.localize("TENEBRIS.Manager.title"),
|
||||
icon: "fa-solid fa-users",
|
||||
button: true,
|
||||
onClick: () => {
|
||||
if (!foundry.applications.instances.has("tenebris-application-manager")) {
|
||||
game.system.applicationManager.render(true)
|
||||
} else game.system.applicationManager.close()
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
btns.push({
|
||||
name: "tenebris",
|
||||
title: "Cthulhu CthulhuEternal",
|
||||
icon: "tenebris",
|
||||
layer: "tenebris",
|
||||
tools: menu,
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user