Originally Posted by Kraeius
Why not just SetHidden his addon's top level control? What's the catch with SCENE_MANAGER?
|
The SCENE_MANAGER solution is more robust. It's also likely that the SCENE_MANAGER can check the rules faster than a Lua handler.
I don't use your Infohub, but just looking at the code -- see how HideCheck starts with a not-so-small condition? It's still quite readable, but if you had more complex rules, it'd quickly get very hard to read and debug. Then, if I read it correctly, it's called upon every OnUpdate on your top-level RAETIA_InfoHub control, which is always visible? That's not good. Why do a visibility check on every single frame? (Edit: oh, it's throttled at 1 per second. My bad. But that means it won't show up immediately, right? I think you could only gain with fragments
) If you had everything in fragments, your HideCheck wouldn't need to exist