From ce8e6815a5e2f7a15d29aeebd60d2fa524738839 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 6 Dec 2022 20:57:33 +0100 Subject: [PATCH] xml cleanup --- src/core/Global.ttslua | 10 +-- xml/Global.xml | 136 ++++++++++++++++++++++------------------- 2 files changed, 78 insertions(+), 68 deletions(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index be3f299a..e92fe345 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -135,9 +135,7 @@ function onLoad(savedData) if savedData then optionPanel = JSON.decode(savedData) for id, enabled in pairs(optionPanel) do - if enabled then - self.UI.setAttribute("toggle" .. id, "isOn", true) - end + if enabled then self.UI.setAttribute("toggle" .. id, "isOn", true) end end else for i = 1, 8 do @@ -613,11 +611,13 @@ function onClick_toggleOption(_, id) self.UI.setAttribute("toggle" .. id, "isOn", state) optionPanel[id] = state - print("Option no. " .. id .. ": " .. tostring(optionPanel[id])) end function onClick_applySettings() - print("Dummy: Apply settings") + print("Enabling following settings:") + for id, value in pairs(optionPanel) do + if value then print(id) end + end end function onClick_toggleUi(_, title) diff --git a/xml/Global.xml b/xml/Global.xml index 0ea616c5..a55724e3 100644 --- a/xml/Global.xml +++ b/xml/Global.xml @@ -11,80 +11,90 @@ - + + + - - - - - - + + + + + + + - - - + + + \ No newline at end of file