It would be useful to get the node_id in the widget callback functions. This way, data from tables can be easily retrieved when the table's key is the node_id.
Example:
local apple_hash = hash("apple_hash")
local banana_hash = hash("banana_hash")
local table = { [apple_hash] = { color: "red" }, [banana_hash] = { color: "yellow" } }
local function button_callback(button)
print("My color is: " .. table[button.node_id])
end
It would be useful to get the node_id in the widget callback functions. This way, data from tables can be easily retrieved when the table's key is the node_id.
Example: