From eb4b40159c1744d4ce584d716acdd978f3787734 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 1 Jul 2024 12:08:58 +0200 Subject: [PATCH] unified ui asset name --- modsettings/CustomUIAssets.json | 18 ++------ src/core/Global.ttslua | 6 +-- xml/Global/OptionPanel.xml | 2 +- xml/accessories/CleanUpHelper.xml | 73 ++++++++++++++++++++++++------- 4 files changed, 65 insertions(+), 34 deletions(-) diff --git a/modsettings/CustomUIAssets.json b/modsettings/CustomUIAssets.json index 37fe7bd3..67f88956 100644 --- a/modsettings/CustomUIAssets.json +++ b/modsettings/CustomUIAssets.json @@ -30,14 +30,14 @@ "URL": "http://cloud-3.steamusercontent.com/ugc/2026086584372569912/5CB461AEAE2E59D3064D90A776EB86C46081EC78/" }, { - "Name": "option-on", + "Name": "option_on", "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668997008/2178787B67B3C96F3419EDBAB8420E39893756BC/" + "URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555728/22ABD35CBB49A001F3A5318E4AFCFB22D24FEA39/" }, { - "Name": "option-off", + "Name": "option_off", "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668996901/D6438ECBB11DECC6DB9987589FF526FBAD4D2368/" + "URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555661/6643E5CC9160FF4624672C255D0DF7B313DA00A5/" }, { "Name": "font_arkhamicons", @@ -69,16 +69,6 @@ "Type": 0, "URL": "http://cloud-3.steamusercontent.com/ugc/2280574378889753733/F67B7B37FF7AA253B6D697E577DF54A3E76030C2/" }, - { - "Name": "option_on", - "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555728/22ABD35CBB49A001F3A5318E4AFCFB22D24FEA39/" - }, - { - "Name": "option_off", - "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2024962321889555661/6643E5CC9160FF4624672C255D0DF7B313DA00A5/" - }, { "Name": "SpeechBubble", "Type": 0, diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 98200319..c0967610 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -1448,7 +1448,7 @@ function onClick_toggleOption(_, _, id) local currentState = optionPanel[id] local newState = not currentState applyOptionPanelChange(id, newState) - UI.setAttribute(id, "image", newState and "option-on" or "option-off") + UI.setAttribute(id, "image", newState and "option_on" or "option_off") end -- color selection for playArea @@ -1542,9 +1542,9 @@ function updateOptionPanelState() elseif (type(optionValue) == "boolean" and optionValue) or (type(optionValue) == "string" and optionValue) or (type(optionValue) == "table" and #optionValue ~= 0) then - UI.setAttribute(id, "image", "option-on") + UI.setAttribute(id, "image", "option_on") else - UI.setAttribute(id, "image", "option-off") + UI.setAttribute(id, "image", "option_off") end end end diff --git a/xml/Global/OptionPanel.xml b/xml/Global/OptionPanel.xml index f5246678..6530366b 100644 --- a/xml/Global/OptionPanel.xml +++ b/xml/Global/OptionPanel.xml @@ -62,7 +62,7 @@