Xml editing

This commit is contained in:
Chr1Z93 2024-06-30 00:20:21 +02:00
parent f71b1d16a6
commit 9eb2c0c1ca
5 changed files with 58 additions and 9 deletions

View File

@ -342,6 +342,18 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/",
"WidthScale": 0 "WidthScale": 0
}, },
"CustomUIAsset": [
{
"Name": "option-on",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668997008/2178787B67B3C96F3419EDBAB8420E39893756BC/"
},
{
"Name": "option-off",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668996901/D6438ECBB11DECC6DB9987589FF526FBAD4D2368/"
}
],
"Description": "", "Description": "",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",

View File

@ -342,6 +342,18 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/",
"WidthScale": 0 "WidthScale": 0
}, },
"CustomUIAsset": [
{
"Name": "option-on",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668997008/2178787B67B3C96F3419EDBAB8420E39893756BC/"
},
{
"Name": "option-off",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668996901/D6438ECBB11DECC6DB9987589FF526FBAD4D2368/"
}
],
"Description": "", "Description": "",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",

View File

@ -342,6 +342,18 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/",
"WidthScale": 0 "WidthScale": 0
}, },
"CustomUIAsset": [
{
"Name": "option-on",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668997008/2178787B67B3C96F3419EDBAB8420E39893756BC/"
},
{
"Name": "option-off",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668996901/D6438ECBB11DECC6DB9987589FF526FBAD4D2368/"
}
],
"Description": "", "Description": "",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",

View File

@ -342,6 +342,18 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2462982115659543571/5D778EA4BC682DAE97E8F59A991BCF8CB3979B04/",
"WidthScale": 0 "WidthScale": 0
}, },
"CustomUIAsset": [
{
"Name": "option-on",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668997008/2178787B67B3C96F3419EDBAB8420E39893756BC/"
},
{
"Name": "option-off",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2462982115668996901/D6438ECBB11DECC6DB9987589FF526FBAD4D2368/"
}
],
"Description": "", "Description": "",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",

View File

@ -8,7 +8,7 @@ local tokenChecker = require("core/token/TokenChecker")
local tokenManager = require("core/token/TokenManager") local tokenManager = require("core/token/TokenManager")
-- option panel data -- option panel data
local availableOptions = { local availableOptions = {
["Personal Settings"] = { ["Personal Settings"] = {
{ {
id = "slotEditing", id = "slotEditing",
@ -682,8 +682,9 @@ function createXML()
local optionPanelXML = { local optionPanelXML = {
tag = "TableLayout", tag = "TableLayout",
attributes = { attributes = {
width = "100", scale = "0.2 0.2",
height = "100", width = "600",
height = "600",
rotation = "0 0 180", rotation = "0 0 180",
position = "300 0 -100", position = "300 0 -100",
--active = "false", --active = "false",
@ -698,7 +699,7 @@ function createXML()
-- header -- header
{ {
tag = "Row", tag = "Row",
attributes = { preferredHeight = "60" }, --attributes = { preferredHeight = "60" },
children = { children = {
{ {
tag = "Cell", tag = "Cell",
@ -725,7 +726,7 @@ function createXML()
-- group header -- group header
local groupXML = { local groupXML = {
tag = "Row", tag = "Row",
attributes = { preferredHeight = "44" }, --attributes = { preferredHeight = "44" },
children = { children = {
{ {
tag = "Cell", tag = "Cell",
@ -751,7 +752,7 @@ function createXML()
local optionXML = { local optionXML = {
{ {
tag = "Row", tag = "Row",
attributes = { preferredHeight = "50", tooltip = optionData.tooltip, tooltipPosition = "Left", tooltipBackgroundColor = "rgba(0,0,0,1)" }, --attributes = { preferredHeight = "50", tooltip = optionData.tooltip, tooltipPosition = "Left", tooltipBackgroundColor = "rgba(0,0,0,1)" },
children = { children = {
-- option title -- option title
{ {
@ -780,7 +781,7 @@ function createXML()
attributes = { attributes = {
id = optionData.id, id = optionData.id,
image = "option-off", image = "option-off",
onClick="onClick_toggleOption", onClick = "onClick_toggleOption",
rectAlignment = "MiddleRight", rectAlignment = "MiddleRight",
offsetXY = "-30 0", offsetXY = "-30 0",
colors = "#FFFFFF|#dfdfdf", colors = "#FFFFFF|#dfdfdf",
@ -794,9 +795,9 @@ function createXML()
} }
} }
} }
table.insert(groupXML, optionXML) table.insert(groupXML.children, optionXML)
end end
table.insert(optionPanelXML, groupXML) table.insert(optionPanelXML.children, groupXML)
end end
table.insert(xml, optionPanelXML) table.insert(xml, optionPanelXML)