diff --git a/code/index.css b/code/index.css index f4a5a95..3e72987 100644 --- a/code/index.css +++ b/code/index.css @@ -138,4 +138,9 @@ .lightButton { position: absolute; right: 0px; + } + + .slot { + display: inline-block; + border: 1px solid white; } \ No newline at end of file diff --git a/code/index.php b/code/index.php index d064f18..3ae4bb7 100644 --- a/code/index.php +++ b/code/index.php @@ -98,6 +98,26 @@ +
+ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
diff --git a/code/options.js b/code/options.js index 23702ea..e6a805b 100644 --- a/code/options.js +++ b/code/options.js @@ -122,4 +122,34 @@ for(var cpt=1;cpt<9;cpt++) pickr`+cpt+`.hide(); });`); +} + +function allowDrop(ev) { + ev.preventDefault(); +} + +function drag(ev) { + ev.dataTransfer.setData("text", ev.target.id); +} + +function drop(ev) { + ev.preventDefault(); + var data = ev.dataTransfer.getData("text"); + if(!ev.target.hasChildNodes() && ev.target.tagName=="DIV") + { + ev.target.appendChild(document.getElementById(data)); + } +} + +var gemsAvailable=["red","yellow","green","purple","black","brown","cyan","orange"]; + +for(var cpt=1;cpt<9;cpt++) +{ + eval("var gemIcon"+cpt+"=document.getElementById('gem"+cpt+"')"); + eval('gemIcon'+cpt+'.src="ress/'+gemsAvailable[cpt-1]+'"'); + eval('gemIcon'+cpt+'.width=size/6'); + + eval("var slot"+cpt+"=document.getElementById('slot"+cpt+"')"); + eval("slot"+cpt+".style.width=size/6"); + eval("slot"+cpt+".style.height=size/6"); } \ No newline at end of file diff --git a/code/ress/dark.png b/code/ress/dark.png deleted file mode 100644 index 284006b..0000000 Binary files a/code/ress/dark.png and /dev/null differ