So as I understand it, you want to have the Source Unit line disappear if the player has a combat event trigger? An OnInitialized field in the virtual might work: You could change anchors + hide the source control in it.
But doing it yourself via anchors and SetHidden would probably be the easiest and simplest method.
I think you could also use ApplyTemplateToControl for styling.
I'm pretty sure controls created from Lua can handle OnUpdate. I haven't tried OnUpdate specifically but I have done OnClicked and some others, so I don't see why OnUpdate would be an exception. (control:SetHandler("OnUpdate", functionStuff) should work)
|