v0.9.2
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
# Changelog Material Deck Module
|
# Changelog Material Deck Module
|
||||||
|
### v0.9.2 - 24-11-2020
|
||||||
|
<ul>
|
||||||
|
<li>Removed unnecessary errors when module is not fully configured</li>
|
||||||
|
<li>Solved issue that soundboard config couldn't be saved on a world that hadn't run Material Deck previously</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
### v0.9.1 - 23-11-2020
|
### v0.9.1 - 23-11-2020
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fixed 'Playlist' action issue where 'TrackNr' wouldn't show</li>
|
<li>Fixed 'Playlist' action issue where 'TrackNr' wouldn't show</li>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "MaterialDeck",
|
"name": "MaterialDeck",
|
||||||
"title": "Material Deck",
|
"title": "Material Deck",
|
||||||
"description": "",
|
"description": "",
|
||||||
"version": "0.9.1",
|
"version": "0.9.2",
|
||||||
"author": "CDeenen",
|
"author": "CDeenen",
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"./MaterialDeck.js"
|
"./MaterialDeck.js"
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ export class CombatTracker{
|
|||||||
if (combat != null && combat != undefined && combat.started)
|
if (combat != null && combat != undefined && combat.started)
|
||||||
tokenId = combat.combatant.tokenId;
|
tokenId = combat.combatant.tokenId;
|
||||||
|
|
||||||
let token = canvas.tokens.children[0].children.find(p => p.id == tokenId);
|
let token
|
||||||
|
if (canvas.tokens.children[0] != undefined) token = canvas.tokens.children[0].children.find(p => p.id == tokenId);
|
||||||
if (token == undefined) return;
|
if (token == undefined) return;
|
||||||
if (onClick == 0) //Do nothing
|
if (onClick == 0) //Do nothing
|
||||||
return;
|
return;
|
||||||
|
|||||||
122
src/misc.js
122
src/misc.js
@@ -135,7 +135,7 @@ export class macroConfigForm extends FormApplication {
|
|||||||
if (streamDeckModel == 0)
|
if (streamDeckModel == 0)
|
||||||
width = 550;
|
width = 550;
|
||||||
else if (streamDeckModel == 1)
|
else if (streamDeckModel == 1)
|
||||||
width= 885;
|
width= 1500;
|
||||||
else
|
else
|
||||||
width = 1400;
|
width = 1400;
|
||||||
*/
|
*/
|
||||||
@@ -290,6 +290,7 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.update = false;
|
this.update = false;
|
||||||
this.iMax;
|
this.iMax;
|
||||||
this.jMax;
|
this.jMax;
|
||||||
|
this.settings = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -328,15 +329,18 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.update=false;
|
this.update=false;
|
||||||
return {soundData: this.data};
|
return {soundData: this.data};
|
||||||
}
|
}
|
||||||
let selectedSounds = game.settings.get(MODULE.moduleName,'soundboardSettings').sounds;
|
this.settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
let colorOn = game.settings.get(MODULE.moduleName,'soundboardSettings').colorOn;
|
/*
|
||||||
let colorOff = game.settings.get(MODULE.moduleName,'soundboardSettings').colorOff;
|
let selectedSounds = this.settings.sounds;
|
||||||
let mode = game.settings.get(MODULE.moduleName,'soundboardSettings').mode;
|
let colorOn = this.settings.colorOn;
|
||||||
let volume = game.settings.get(MODULE.moduleName,'soundboardSettings').volume;
|
let colorOff = this.settings.colorOff;
|
||||||
let img = game.settings.get(MODULE.moduleName,'soundboardSettings').img;
|
let mode = this.settings.mode;
|
||||||
let name = game.settings.get(MODULE.moduleName,'soundboardSettings').name;
|
let volume = this.settings.volume;
|
||||||
let selectedPlaylists = game.settings.get(MODULE.moduleName,'soundboardSettings').selectedPlaylists;
|
let img = this.settings.img;
|
||||||
let src = game.settings.get(MODULE.moduleName,'soundboardSettings').src;
|
let name = this.settings.name;
|
||||||
|
let selectedPlaylists = this.settings.selectedPlaylists;
|
||||||
|
let src = this.settings.src;
|
||||||
|
*/
|
||||||
|
|
||||||
let playlists = [];
|
let playlists = [];
|
||||||
playlists.push({id:"none",name:game.i18n.localize("MaterialDeck.None")});
|
playlists.push({id:"none",name:game.i18n.localize("MaterialDeck.None")});
|
||||||
@@ -345,14 +349,15 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
playlists.push({id:game.playlists.entities[i]._id,name:game.playlists.entities[i].name});
|
playlists.push({id:game.playlists.entities[i]._id,name:game.playlists.entities[i].name});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedSounds == undefined) selectedSounds = [];
|
if (this.settings.sounds == undefined) this.settings.sounds = [];
|
||||||
if (colorOn == undefined) colorOn = [];
|
if (this.settings.colorOn == undefined) this.settings.colorOn = [];
|
||||||
if (colorOff == undefined) colorOff = [];
|
if (this.settings.colorOff == undefined) this.settings.colorOff = [];
|
||||||
if (mode == undefined) mode = [];
|
if (this.settings.mode == undefined) this.settings.mode = [];
|
||||||
if (img == undefined) img = [];
|
if (this.settings.img == undefined) this.settings.img = [];
|
||||||
if (name == undefined) name = [];
|
if (this.settings.volume == undefined) this.settings.volume = [];
|
||||||
if (selectedPlaylists == undefined) selectedPlaylists = [];
|
if (this.settings.name == undefined) this.settings.name = [];
|
||||||
if (src == undefined) src = [];
|
if (this.settings.selectedPlaylists == undefined) this.settings.selectedPlaylists = [];
|
||||||
|
if (this.settings.src == undefined) this.settings.src = [];
|
||||||
let soundData = [];
|
let soundData = [];
|
||||||
|
|
||||||
let streamDeckModel = game.settings.get(MODULE.moduleName,'streamDeckModel');
|
let streamDeckModel = game.settings.get(MODULE.moduleName,'streamDeckModel');
|
||||||
@@ -377,12 +382,12 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
for (let i=0; i<this.iMax; i++){
|
for (let i=0; i<this.iMax; i++){
|
||||||
let selectedPlaylist;
|
let selectedPlaylist;
|
||||||
let sounds = [];
|
let sounds = [];
|
||||||
if (volume == undefined) volume = 50;
|
if (this.settings.volume[iteration] == undefined) this.settings.volume[iteration] = 50;
|
||||||
if (selectedPlaylists[iteration]==undefined) selectedPlaylist = 'none';
|
if (this.settings.selectedPlaylists[iteration]==undefined) selectedPlaylist = 'none';
|
||||||
else if (selectedPlaylists[iteration] == 'none') selectedPlaylist = 'none';
|
else if (this.settings.selectedPlaylists[iteration] == 'none') selectedPlaylist = 'none';
|
||||||
else if (selectedPlaylists[iteration] == 'FP') selectedPlaylist = 'FP';
|
else if (this.settings.selectedPlaylists[iteration] == 'FP') selectedPlaylist = 'FP';
|
||||||
else {
|
else {
|
||||||
const pl = game.playlists.entities.find(p => p._id == selectedPlaylists[iteration]);
|
const pl = game.playlists.entities.find(p => p._id == this.settings.selectedPlaylists[iteration]);
|
||||||
selectedPlaylist = pl._id;
|
selectedPlaylist = pl._id;
|
||||||
sounds = pl.sounds;
|
sounds = pl.sounds;
|
||||||
}
|
}
|
||||||
@@ -396,15 +401,15 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
iteration: iteration+1,
|
iteration: iteration+1,
|
||||||
playlists: playlists,
|
playlists: playlists,
|
||||||
selectedPlaylist: selectedPlaylist,
|
selectedPlaylist: selectedPlaylist,
|
||||||
sound: selectedSounds[iteration],
|
sound: this.settings.sounds[iteration],
|
||||||
sounds: sounds,
|
sounds: sounds,
|
||||||
srcPath: src[iteration],
|
srcPath: this.settings.src[iteration],
|
||||||
colorOn: colorOn[iteration],
|
colorOn: this.settings.colorOn[iteration],
|
||||||
colorOff: colorOff[iteration],
|
colorOff: this.settings.colorOff[iteration],
|
||||||
mode: mode[iteration],
|
mode: this.settings.mode[iteration],
|
||||||
volume: volume[iteration],
|
volume: this.settings.volume[iteration],
|
||||||
imgPath: img[iteration],
|
imgPath: this.settings.img[iteration],
|
||||||
name: name[iteration],
|
name: this.settings.name[iteration],
|
||||||
styleSS: styleSS,
|
styleSS: styleSS,
|
||||||
styleFP: styleFP
|
styleFP: styleFP
|
||||||
}
|
}
|
||||||
@@ -476,9 +481,10 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].name=event.target.value;
|
this.data[j].dataThis[i].name=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.name[id-1]=event.target.value;
|
//console.log('settings',settings);
|
||||||
this.updateSettings(settings);
|
this.settings.name[id-1]=event.target.value;
|
||||||
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (playlistSelect.length > 0) {
|
if (playlistSelect.length > 0) {
|
||||||
@@ -510,9 +516,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].styleFP=styleFP;
|
this.data[j].dataThis[i].styleFP=styleFP;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.selectedPlaylists[id-1]=event.target.value;
|
this.settings.selectedPlaylists[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,9 +529,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].sound=event.target.value;
|
this.data[j].dataThis[i].sound=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.sounds[id-1]=event.target.value;
|
this.settings.sounds[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
soundFP.on("change",event => {
|
soundFP.on("change",event => {
|
||||||
@@ -535,9 +541,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].srcPath=event.target.value;
|
this.data[j].dataThis[i].srcPath=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.src[id-1]=event.target.value;
|
this.settings.src[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
imgFP.on("change",event => {
|
imgFP.on("change",event => {
|
||||||
@@ -547,9 +553,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].imgPath=event.target.value;
|
this.data[j].dataThis[i].imgPath=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.img[id-1]=event.target.value;
|
this.settings.img[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
onCP.on("change",event => {
|
onCP.on("change",event => {
|
||||||
@@ -559,9 +565,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].colorOn=event.target.value;
|
this.data[j].dataThis[i].colorOn=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.colorOn[id-1]=event.target.value;
|
this.settings.colorOn[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
offCP.on("change",event => {
|
offCP.on("change",event => {
|
||||||
@@ -571,9 +577,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].colorOff=event.target.value;
|
this.data[j].dataThis[i].colorOff=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.colorOff[id-1]=event.target.value;
|
this.settings.colorOff[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
playMode.on("change",event => {
|
playMode.on("change",event => {
|
||||||
@@ -583,9 +589,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].mode=event.target.value;
|
this.data[j].dataThis[i].mode=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.mode[id-1]=event.target.value;
|
this.settings.mode[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
|
|
||||||
volume.on("change",event => {
|
volume.on("change",event => {
|
||||||
@@ -595,9 +601,9 @@ export class soundboardConfigForm extends FormApplication {
|
|||||||
this.data[j].dataThis[i].volume=event.target.value;
|
this.data[j].dataThis[i].volume=event.target.value;
|
||||||
this.update = true;
|
this.update = true;
|
||||||
|
|
||||||
let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
//let settings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
settings.volume[id-1]=event.target.value;
|
this.settings.volume[id-1]=event.target.value;
|
||||||
this.updateSettings(settings);
|
this.updateSettings(this.settings);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ export class Move{
|
|||||||
}
|
}
|
||||||
|
|
||||||
keyPress(settings){
|
keyPress(settings){
|
||||||
console.log('move',settings)
|
if (canvas.scene == null) return;
|
||||||
|
//console.log('move',settings)
|
||||||
let dir = settings.dir;
|
let dir = settings.dir;
|
||||||
let mode = settings.mode;
|
let mode = settings.mode;
|
||||||
if (mode == undefined) mode = 0;
|
if (mode == undefined) mode = 0;
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ export class OtherControls{
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
updateScene(settings,context){
|
updateScene(settings,context){
|
||||||
|
if (canvas.scene == null) return;
|
||||||
let func = settings.sceneFunction;
|
let func = settings.sceneFunction;
|
||||||
if (func == undefined) func = 0;
|
if (func == undefined) func = 0;
|
||||||
|
|
||||||
@@ -216,6 +217,7 @@ export class OtherControls{
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
updateControl(settings,context){
|
updateControl(settings,context){
|
||||||
|
//if (canvas.scene == null) return;
|
||||||
let control = settings.control;
|
let control = settings.control;
|
||||||
if (control == undefined) control = 0;
|
if (control == undefined) control = 0;
|
||||||
|
|
||||||
@@ -305,6 +307,7 @@ export class OtherControls{
|
|||||||
}
|
}
|
||||||
|
|
||||||
keyPressControl(settings){
|
keyPressControl(settings){
|
||||||
|
if (canvas.scene == null) return;
|
||||||
let control = settings.control;
|
let control = settings.control;
|
||||||
if (control == undefined) control = 0;
|
if (control == undefined) control = 0;
|
||||||
|
|
||||||
@@ -474,7 +477,8 @@ export class OtherControls{
|
|||||||
}
|
}
|
||||||
else if (func == 2){ //display darkness
|
else if (func == 2){ //display darkness
|
||||||
src = 'action/images/other/darkness/darkness.png';
|
src = 'action/images/other/darkness/darkness.png';
|
||||||
let darkness = Math.floor(canvas.scene.data.darkness*100)/100;
|
let darkness = '';
|
||||||
|
if (canvas.scene != null) darkness = Math.floor(canvas.scene.data.darkness*100)/100;
|
||||||
txt += darkness;
|
txt += darkness;
|
||||||
}
|
}
|
||||||
streamDeck.setTitle(txt,context);
|
streamDeck.setTitle(txt,context);
|
||||||
@@ -482,6 +486,7 @@ export class OtherControls{
|
|||||||
}
|
}
|
||||||
|
|
||||||
keyPressDarkness(settings) {
|
keyPressDarkness(settings) {
|
||||||
|
if (canvas.scene == null) return;
|
||||||
let func = settings.darknessFunction;
|
let func = settings.darknessFunction;
|
||||||
if (func == undefined) func = 0;
|
if (func == undefined) func = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -148,8 +148,10 @@ export class PlaylistControl{
|
|||||||
}
|
}
|
||||||
|
|
||||||
getPlaylist(num){
|
getPlaylist(num){
|
||||||
let playlistId = game.settings.get(MODULE.moduleName,'playlists').selectedPlaylist[num];
|
let selectedPlaylists = game.settings.get(MODULE.moduleName,'playlists').selectedPlaylist;
|
||||||
return game.playlists.entities.find(p => p._id == playlistId);
|
if (selectedPlaylists != undefined)
|
||||||
|
return game.playlists.entities.find(p => p._id == selectedPlaylists[num]);
|
||||||
|
else return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
keyPress(settings,context){
|
keyPress(settings,context){
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ export class SoundboardControl{
|
|||||||
else
|
else
|
||||||
ringColor = soundboardSettings.colorOn[soundNr];
|
ringColor = soundboardSettings.colorOn[soundNr];
|
||||||
|
|
||||||
if (settings.displayName) txt = soundboardSettings.name[soundNr];
|
if (settings.displayName && soundboardSettings.name != undefined) txt = soundboardSettings.name[soundNr];
|
||||||
if (settings.displayIcon) src = soundboardSettings.img[soundNr];
|
if (settings.displayIcon && soundboardSettings.img != undefined) src = soundboardSettings.img[soundNr];
|
||||||
streamDeck.setTitle(txt,context);
|
streamDeck.setTitle(txt,context);
|
||||||
streamDeck.setIcon(1,context,src,background,2,ringColor);
|
streamDeck.setIcon(1,context,src,background,2,ringColor);
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,8 @@ export class SoundboardControl{
|
|||||||
|
|
||||||
async playSound(soundNr,repeat,play){
|
async playSound(soundNr,repeat,play){
|
||||||
const soundBoardSettings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
const soundBoardSettings = game.settings.get(MODULE.moduleName,'soundboardSettings');
|
||||||
const playlistId = soundBoardSettings.selectedPlaylists[soundNr];
|
let playlistId;
|
||||||
|
if (soundBoardSettings.selectedPlaylists != undefined) playlistId = soundBoardSettings.selectedPlaylists[soundNr];
|
||||||
let src;
|
let src;
|
||||||
if (playlistId == "" || playlistId == undefined) return;
|
if (playlistId == "" || playlistId == undefined) return;
|
||||||
if (playlistId == 'none') return;
|
if (playlistId == 'none') return;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class StreamDeck{
|
|||||||
return words.match(this.syllableRegex);
|
return words.match(this.syllableRegex);
|
||||||
}
|
}
|
||||||
|
|
||||||
formatTitle(txt){
|
formatTitle(txt=''){
|
||||||
let txtArrayOriginal = txt.split("\n");
|
let txtArrayOriginal = txt.split("\n");
|
||||||
let txtArray = [];
|
let txtArray = [];
|
||||||
let counter = 0;
|
let counter = 0;
|
||||||
@@ -185,7 +185,7 @@ export class StreamDeck{
|
|||||||
MODULE.sendWS(JSON.stringify(json));
|
MODULE.sendWS(JSON.stringify(json));
|
||||||
}
|
}
|
||||||
|
|
||||||
setIcon(iconLocation, context,src,background = '#000000',ring=0,ringColor = "#000000",overlay=false){
|
setIcon(iconLocation, context,src='',background = '#000000',ring=0,ringColor = "#000000",overlay=false){
|
||||||
for (let i=0; i<32; i++){
|
for (let i=0; i<32; i++){
|
||||||
if (this.buttonContext[i] == undefined) continue;
|
if (this.buttonContext[i] == undefined) continue;
|
||||||
if (this.buttonContext[i].context == context) {
|
if (this.buttonContext[i].context == context) {
|
||||||
@@ -291,7 +291,7 @@ export class StreamDeck{
|
|||||||
canvas.id = canvasId;
|
canvas.id = canvasId;
|
||||||
canvas.width="144";
|
canvas.width="144";
|
||||||
canvas.height="144";
|
canvas.height="144";
|
||||||
canvas.style="background-color:transparent";
|
canvas.style="background-color:transparent;visibility:hidden";
|
||||||
document.getElementById('sdCanvasBox').appendChild(canvas); // adds the canvas to #someBox
|
document.getElementById('sdCanvasBox').appendChild(canvas); // adds the canvas to #someBox
|
||||||
}
|
}
|
||||||
this.counter++;
|
this.counter++;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class TokenControl{
|
|||||||
}
|
}
|
||||||
|
|
||||||
pushData(tokenId,settings,context,ring=0,ringColor='#000000'){
|
pushData(tokenId,settings,context,ring=0,ringColor='#000000'){
|
||||||
console.log('token',settings);
|
//console.log('token',settings);
|
||||||
let name = false;
|
let name = false;
|
||||||
let icon = false;
|
let icon = false;
|
||||||
let stats = settings.stats;
|
let stats = settings.stats;
|
||||||
@@ -258,7 +258,7 @@ export class TokenControl{
|
|||||||
const tokenId = MODULE.selectedTokenId;
|
const tokenId = MODULE.selectedTokenId;
|
||||||
|
|
||||||
let onClick = settings.onClick;
|
let onClick = settings.onClick;
|
||||||
if (onClick == undefined) conClick = 0;
|
if (onClick == undefined) onClick = 0;
|
||||||
|
|
||||||
const token = canvas.tokens.children[0].children.find(p => p.id == tokenId);
|
const token = canvas.tokens.children[0].children.find(p => p.id == tokenId);
|
||||||
if (token == undefined) return;
|
if (token == undefined) return;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
{{localize "MaterialDeck.Macro"}} {{this.iteration}}
|
{{localize "MaterialDeck.Macro"}} {{this.iteration}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<select name="macros" class="macros-select" id="macros{{this.iteration}}" default="" style="max-width:140px;">
|
<select name="macros" class="macros-select" id="macros{{this.iteration}}" default="" style="min-width:140px;">
|
||||||
{{#select this.macro}}
|
{{#select this.macro}}
|
||||||
<option value="">{{localize "MaterialDeck.None"}}</option>
|
<option value="">{{localize "MaterialDeck.None"}}</option>
|
||||||
{{#each macros}}
|
{{#each macros}}
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
{{localize "MaterialDeck.Name"}}
|
{{localize "MaterialDeck.Name"}}
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="namebox" value="{{this.name}}" id="name{{this.iteration}}">
|
<input type="text" name="namebox" value="{{this.name}}" id="name{{this.iteration}}" style="width:100%;" >
|
||||||
|
|
||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
{{localize "MaterialDeck.Playlist"}}
|
{{localize "MaterialDeck.Playlist"}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<select name="playlist" class="playlist-select" default="" style="width:132px;" id="playlists{{this.iteration}}">
|
<select name="playlist" class="playlist-select" default="" style="width:100%;" id="playlists{{this.iteration}}">
|
||||||
{{#select this.selectedPlaylist}}
|
{{#select this.selectedPlaylist}}
|
||||||
{{#each playlists}}
|
{{#each playlists}}
|
||||||
<option value="{{this.id}}">{{this.name}}</option>
|
<option value="{{this.id}}">{{this.name}}</option>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
{{localize "MaterialDeck.Sound"}}
|
{{localize "MaterialDeck.Sound"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-fields" style={{this.styleSS}}>
|
<div class="form-fields" style={{this.styleSS}}>
|
||||||
<select name="sounds" class="sounds-select" default="" style="width:132px;" id="soundSelect{{this.iteration}}">
|
<select name="sounds" class="sounds-select" default="" style="width:100%;" id="soundSelect{{this.iteration}}">
|
||||||
{{#select this.sound}}
|
{{#select this.sound}}
|
||||||
<option value="">{{localize "MaterialDeck.None"}}</option>
|
<option value="">{{localize "MaterialDeck.None"}}</option>
|
||||||
{{#each sounds}}
|
{{#each sounds}}
|
||||||
|
|||||||
Reference in New Issue
Block a user