Skip to content

Commit

Permalink
v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
CDeenen committed Nov 11, 2020
1 parent 47ccabd commit 76ca651
Show file tree
Hide file tree
Showing 15 changed files with 745 additions and 817 deletions.
Binary file modified Plugin/Release/com.cdeenen.materialdeck.streamDeckPlugin
Binary file not shown.
30 changes: 14 additions & 16 deletions Plugin/com.cdeenen.materialdeck.sdPlugin/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function connected(jsn) {
$SD.on(actions[i]+'.keyDown', (jsonObj) => action.onEvent(jsonObj));
$SD.on(actions[i]+'.keyUp', (jsonObj) => action.onEvent(jsonObj));
$SD.on(actions[i]+'.didReceiveSettings', (jsonObj) => action.onEvent(jsonObj));
//$SD.on(actions[i]+'.propertyInspectorDidAppear', (jsonObj) => {
// console.log('%c%s', 'color: white; background: black; font-size: 13px;', '[app.js]propertyInspectorDidAppear:');
// });
}
};

Expand Down Expand Up @@ -240,8 +243,7 @@ function sendToSDWS(msg) {
//setState(msg);
}
else if (event == 'setIcon'){
let msg = {context: context, url: data.url, format: data.format, background: data.background, combat: data.combat}
drawImage(msg);
drawImage(data);
}
else
$SD.connection.send(msg);
Expand Down Expand Up @@ -333,7 +335,6 @@ function drawImage(data){
console.log('drawImage1',data);
if (data == undefined)
return;

const context = data.context;
var url = data.url;
const format = data.format;
Expand All @@ -347,13 +348,9 @@ function drawImage(data){
BGvalid = false;
if (BGvalid == false) background = '#000000';

//console.log('drawImage',{context:context,url:url,format:format,background:background})
if (format == 'svg'){
url = "action/images/black.png";
}
if (url == "" || format == 'color')
url = "action/images/transparant.png"
console.log(url);

let canvas;
let canvasId = 'canvas' + counter;
canvas = document.getElementById(canvasId);
Expand All @@ -364,17 +361,21 @@ function drawImage(data){
ctx.filter = "none";

let margin = 0;
ctx.fillStyle = background;
ctx.fillRect(0, 0, canvas.width, canvas.height);
if (data.combat != undefined && data.combat > 0){
if (data.ring != undefined && data.ring > 0){
ctx.fillStyle = background;
ctx.fillRect(0, 0, canvas.width, canvas.height);
margin = 10;
if (data.combat == 2) {
ctx.fillStyle = '#cccc00';
if (data.ring == 2) {
ctx.fillStyle = data.ringColor;
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = background;
ctx.fillRect(margin, margin, canvas.width-2*margin, canvas.height-2*margin);
}
}
else {
ctx.fillStyle = background;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}

let resImageURL = url;

Expand Down Expand Up @@ -412,9 +413,6 @@ function drawImage(data){
yStart = 0;
}

if (data.combat){

}
ctx.drawImage(img, xStart+margin, yStart+margin, renderableWidth - 2*margin, renderableHeight - 2*margin);

var json = {
Expand Down
16 changes: 0 additions & 16 deletions Plugin/com.cdeenen.materialdeck.sdPlugin/de.json

This file was deleted.

15 changes: 0 additions & 15 deletions Plugin/com.cdeenen.materialdeck.sdPlugin/en.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>com.elgato.template.externalWindow</title>
<title>com.cdeenen.materialplane.externalWindow</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="propertyinspector/css/sdpi.css">
<style>
Expand Down
4 changes: 2 additions & 2 deletions Plugin/com.cdeenen.materialdeck.sdPlugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
"Description": "Stream Deck plugin for the 'Material Deck' Foundry VTT module",
"Name": "Material Deck",
"Icon": "vtt",
"URL": "https://www.elgato.com/en/gaming/stream-deck",
"Version": "0.7.0",
"URL": "https://github.com/CDeenen/MaterialDeck_SD",
"Version": "0.7.1",
"OS": [
{
"Platform": "mac",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui,viewport-fit=cover">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>com.cdeenen.materialdeck Combat Tracker Property Inspector</title>
<link rel="stylesheet" href="css/sdpi.css">
</head>
<body>
<div class="sdpi-wrapper" id="wrapper" style="visibility:hidden">
<div class="sdpi-item">
<div class="sdpi-item-label">Mode</div>
<select class="sdpi-item-value select" id="combatTrackerMode" type="select">
<option value=0>Combatants</option>
<option value=1>Current Turn's Combatant</option>
<option value=2>Function</option>
</select>
</div>
<div id="func" style="display:none">
<div class="sdpi-item">
<div class="sdpi-item-label">Function</div>
<select class="sdpi-item-value select" id="combatTrackerFunction" type="select">
<option value=0>Start/Stop Combat</option>
<option value=1>Next Turn</option>
<option value=2>Previous Turn</option>
<option value=3>Next Round</option>
<option value=4>Previous Round</option>
<option value=5>Turn Display</option>
</select>
</div>
<div id="turnDisplay" style="display:none">
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Turn</div>
<input class="sdpi-item-value" id="displayTurn" type="checkbox">
<label for="displayTurn"><span></span></label>
</div>
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Round</div>
<input class="sdpi-item-value" id="displayRound" type="checkbox">
<label for="displayRound"><span></span></label>
</div>
</div>
</div>
<div id="combatant" style="display:none">
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Name</div>
<input class="sdpi-item-value" id="displayName" type="checkbox">
<label for="displayName"><span></span></label>
</div>
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Icon</div>
<input class="sdpi-item-value" id="displayIcon" type="checkbox">
<label for="displayIcon"><span></span></label>
</div>
<div class="sdpi-item">
<div class="sdpi-item-label">Stats</div>
<select class="sdpi-item-value select" id="stats" type="select">
<option value=0>None</option>
<option value=1>HP</option>
<option value=2>AC</option>
<option value=3>Speed</option>
<option value=4>Initiative</option>
</select>
</div>
<div class="sdpi-item">
<div class="sdpi-item-label">On Click</div>
<select class="sdpi-item-value select" id="onClick" type="select">
<option value=0>Do Nothing</option>
<option value=1>Select Token</option>
<option value=2>Center on Token</option>
<option value=3>Center on Token and Select Token</option>
<option value=4>Open Character Sheet</option>
<option value=5>Open Token Config</option>
</select>
</div>
<div class="sdpi-item" id="combatantNrSel" stype="display:none">
<div class="sdpi-item-label">Combatant Nr</div>
<input class="sdpi-item-value" id="combatantNr" value="1">
</div>
<html>
<head>
<meta charset="utf-8" />
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui,viewport-fit=cover">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>com.cdeenen.materialdeck Combat Tracker Property Inspector</title>
<link rel="stylesheet" href="css/sdpi.css">
</head>
<body>
<div class="sdpi-wrapper" id="wrapper" style="visibility:hidden">
<div class="sdpi-item">
<div class="sdpi-item-label">Mode</div>
<select class="sdpi-item-value select" id="combatTrackerMode" type="select">
<option value=0>Combatants</option>
<option value=1>Current Turn's Combatant</option>
<option value=2>Function</option>
</select>
</div>
<div id="func" style="display:none">
<div class="sdpi-item">
<div class="sdpi-item-label">Function</div>
<select class="sdpi-item-value select" id="combatTrackerFunction" type="select">
<option value=0>Start/Stop Combat</option>
<option value=1>Next Turn</option>
<option value=2>Previous Turn</option>
<option value=3>Next Round</option>
<option value=4>Previous Round</option>
<option value=5>Turn Display</option>
</select>
</div>
<div id="turnDisplay" style="display:none">
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Turn</div>
<input class="sdpi-item-value" id="displayTurn" type="checkbox">
<label for="displayTurn"><span></span></label>
</div>
<div class="sdpi-item" id="backgroundContainer">
<div class="sdpi-item-label">Background</div>
<input class="sdpi-item-value" id="background" value="#000000">
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Round</div>
<input class="sdpi-item-value" id="displayRound" type="checkbox">
<label for="displayRound"><span></span></label>
</div>
</div>
</div>
<div id="combatant" style="">
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Name</div>
<input class="sdpi-item-value" id="displayName" type="checkbox">
<label for="displayName"><span></span></label>
</div>
<div type="checkbox" class="sdpi-item">
<div class="sdpi-item-label">Display Icon</div>
<input class="sdpi-item-value" id="displayIcon" type="checkbox">
<label for="displayIcon"><span></span></label>
</div>
<div class="sdpi-item">
<div class="sdpi-item-label">Stats</div>
<select class="sdpi-item-value select" id="stats" type="select">
<option value=0>None</option>
<option value=1>HP</option>
<option value=2>AC</option>
<option value=3>Speed</option>
<option value=4>Initiative</option>
</select>
</div>
<div class="sdpi-item">
<div class="sdpi-item-label">On Click</div>
<select class="sdpi-item-value select" id="onClick" type="select">
<option value=0>Do Nothing</option>
<option value=1>Select Token</option>
<option value=2>Center on Token</option>
<option value=3>Center on Token and Select Token</option>
<option value=4>Open Character Sheet</option>
<option value=5>Open Token Config</option>
</select>
</div>
<div class="sdpi-item" id="combatantNrSel" stype="display:none">
<div class="sdpi-item-label">Combatant Nr</div>
<input class="sdpi-item-value" id="combatantNr" value="1">
</div>
</div>
<div class="sdpi-item" id="backgroundContainer">
<div class="sdpi-item-label">Background</div>
<input class="sdpi-item-value" id="background" value="#000000">
</div>
</div>

<div class="sdpi-info-label hidden" style="top: -1000;" value=""></div>
<script src="js/common.js"></script>
<script src="js/common_pi.js"></script>
<script src="js/index_pi.js"></script>
</body>
</html>
<div class="sdpi-info-label hidden" style="top: -1000;" value=""></div>
<script src="js/common.js"></script>
<script src="js/common_pi.js"></script>
<script src="js/index_pi.js"></script>
</body>
</html>
Loading

0 comments on commit 76ca651

Please sign in to comment.