QUOTE(zZzZzZz @ Dec 31 2003, 09:59 AM)
QUOTE(danZ @ Dec 31 2003, 08:29 PM)
I'm trying activate and hide the main ui from my component. I'm using
CODE
user_interface::g_find("Default User Interface")->activate();
user_interface::g_find("Default User Interface")->hide();
I'm a little confused about the user_interface service. Can you activate more then one UI at the same time? Can more then one be visible? Can you get a ptr to current UI (assuming you can ony have 1) - that is replace the string constant above with some config variable or something?
Don't call UI services, only core does that, you will break things if you do.
Use appropiate menu_manager::run_command() instead to activate main window
OK, I didn't see those (Foobar2000/Hide main window, Foobar2000/Activate main window, Foobar2000/Hide or show main window)
I'd still like to provide a lua hook for determining the current active state of the ui such as
bool fb2k_uiIsActivated()
How would I do that? - can I iterate checking ::is_visible() ? or should I use the windows API such as
::IsWindowVisible(service_factory_base::get_main_window()
Thanks.