Raising a GUI from another

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
User avatar
Haimi
Posts:85
Joined:2011-11-23, 09:28
Raising a GUI from another

Post by Haimi » 2012-03-07, 14:49

Hi @ll,

how can I manage to raise a completely other GUI from another? E.g. when I want to raise the main Menu from the Chat input console?
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Raising a GUI from another

Post by Carsten » 2012-03-07, 23:10

Haimi wrote:Hi @ll,

how can I manage to raise a completely other GUI from another? E.g. when I want to raise the main Menu from the Chat input console?
You'd need access to the GuiMan's BringToFront() method, but this method is not really meant to be called from a Gui.

If you want to bring the main menu to front from the chat input console, then you should rather deactivate the chat input (as the sample implementation does), rather than attempting to force a "foreign" GUI to front.

If you have a GUI that opens another (chat-) GUI like a subdialog, then I'd suggest (and in fact, recommend) to have the chat dialog not as a separate GUI, as the current implementation in DeathMatch does, but rather as a full-screen, but regular window in the main GUI. This can be seen with several dialog windows in the MainMenu example GUI.
This way, you'd have maximum control over every aspect of all windows in that GUI. :up:
Best regards,
Carsten
User avatar
Haimi
Posts:85
Joined:2011-11-23, 09:28

Re: Raising a GUI from another

Post by Haimi » 2012-03-08, 11:24

Question cleared :)
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests