I have several lists i use to display a json. When you select an item on the names list, i set .text in other lists to list the keys and values. But it doesn’t do anything.
The pastebin includes all utility functions used here, but they’re not the problem, i just don’t want someone to say it’s those that don’t work (i know they work because i use them for initializing .text)
https://pastebin.com/ywYspBJ6
My Json file
https://pastebin.com/HymeciZ8
Main
https://pastebin.com/9TuE3gqz
function listRax()
local panel = Soda.Window{
title = "Unit Designer",
hidden = false,
x=0, y=0.5, w=0, h=0.8,
blurred = true, --style = Soda.style.darkBlurred, --gaussian blurs what is underneath it
shadow = true,
shapeArgs = { corners = 1 | 3 | ~4 }
}
local keys =
Soda.List{
parent = panel,
x = .6, y = 20, w = .251, h = .8,
text = getJsonKeys(rax, 1)
}
local values =
Soda.List{
parent = panel,
x = .78, y = 20, w = .1, h = .8,
text = getJsonValues(rax, 1)
}
local unit_names = Soda.List{
parent = panel,
x = .325, y = 20, w = .25, h = .8,
text = getJsonNames(rax),
default = 1,
callback = function(_, selected, __)
keys.text = getJsonKeys(rax, selected.idNo)
values.text = getJsonValues(rax, selected.idNo)
end
}
--local textEntry = Soda.TextEntry{ --callback in values list (the one with text=getJsonValues)
--parent = panel
end