From 8aeae2c81c550a986417373b87ef9ae25ebcf288 Mon Sep 17 00:00:00 2001 From: canarddu38 <71982379+canarddu38@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:15:26 +0200 Subject: [PATCH] Add files via upload --- docs/app.js | 48 +++++++++++++++++++++++++++++++++++++++++++++--- docs/studio.html | 7 ++++++- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/docs/app.js b/docs/app.js index 492e51e..8062018 100644 --- a/docs/app.js +++ b/docs/app.js @@ -32,6 +32,35 @@ const Controls = { }, }; +function editChild(property, value, subProperty="", increase=0, pixel=false) { + var element = document.getElementById(currentID).children[0]; + if (element) { + if(increase > 0) { + if(subProperty!=""){ + element[property][subProperty] += value; + } else { + element[property] += value; + } + } + else if(increase < 0) { + if(subProperty!=""){ + element[property][subProperty] -= value; + } else { + element[property] -= value; + } + } + else if(increase == 0){ + if(subProperty!=""){ + element[property][subProperty] = value; + } else { + element[property] = value; + } + } + } else { + console.error("Element with ID '" + elementId + "' not found."); + } +} + function edit(property, value, subProperty="", increase=0, pixel=false) { var element = document.getElementById(currentID); if (element) { @@ -123,14 +152,27 @@ function setPercentMode2(e) { inputElem.value = Math.round(inputElem.value/100*320); } } - +function hideCustomEdits() { + var editFields = document.getElementsById("customEdit"); + for(i=0; i < editFields.children.length) { + +} function loadEdit(type) { - var editFields = document.getElementsById("control_editor"); - + var editFields = document.getElementsById("customEdit"); + + + if(!type in Controls) { alert("Invalid control type"); return; } + + + switch(type) { + case "Text": + + break; + } // displays GeneralAttributes diff --git a/docs/studio.html b/docs/studio.html index 18a4d12..cd5aa88 100644 --- a/docs/studio.html +++ b/docs/studio.html @@ -99,6 +99,11 @@

d3m0n App Studio

+
+ +
content:
+ +
@@ -111,7 +116,7 @@

d3m0n App Studio

- + Add Draggable Element