Off the top of my head, something like this in data.lua:
Code: Select all
data:extend({ .... operate_ui = "my_entity_ui" })
Code: Select all
function my_entity_ui(window, player, entity)
-- window is a LuaGuiElement object like player.gui.top etc.
end
I went with "operate" in these examples to match the existing property related to whether you can interact with an entity.
I'd rather see if the idea is at all viable before spending too much time thinking of good names. :-)