First window cannot be activated after second is created...

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Tzyr
Just popping in
Just popping in
Posts: 7
Joined: Tue Nov 29, 2005 06:42

First window cannot be activated after second is created...

Postby Tzyr » Sun Dec 18, 2005 23:43

In one screen in my game, I have three sets of buttons/cegui stuff that I want to controll seperately.

1) the basic buttons that either pop-up a new window (host or join game), or go back to previous screen

2) the list box area, one chat window (listbox), one edit box (for entering text for the chat), and two other lists.

3) if either host or join game are pushed, a frame window is created and is placed over (1)

The problem is, if I create (3), I cannot do anything with (2) (which is uncovered).

I realized that I could not have 1 and 2 combined, and use 3, so I tried splitting them into 3 seperate windows. at any one time, I need to be able to use either 1 and 2, or 2 and 3.

Every time I enter a different screen, I set the GUI sheet to the window.

(example: if both 1 and 2 are in the same sheet)

Code: Select all

mEditorGuiSheet = CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Server_Select");
mGUISystem->setGUISheet(mEditorGuiSheet);
mEditorGuiSheet->show();


I also tried making 1 and 2 as childs of a bare "Default Window" cause these windows do not overlap, I wanted the same result that was achieved in Demo 7.

In Demo 7, all windows are created as childs of a blank window. And everytime the mouse is over each window, the mouse changes (as in you can enter that window). There are no additional properties added, like checking for any events, yet when you move a mouse over a different frame, that window will be activated. When I try it, only the last window will be activated.

If I set one to always be ontop, or set both activated, or anything like that, only one I can use, while the other is null.

I even tried EventMouseEnters, moveToFront and so forth for each window..but again, the last window created will accept input, while the other is dead.

here is a simple diagram of what I am trying to do if my earlier explination is vague (or you dun understand it)

1 + 2 (original)

Code: Select all



--------------------
|                  |
|        2         |
|                  |
--------------------
====================

 --------  --------
 | host |  | join |   <-- 1
 --------  --------


after you push a button in 1,

2 + 3

Code: Select all

--------------------
|                  |
|        2         |
|                  |
--------------------
====================
--------------------
|                  |
|        3         |
|                  |
--------------------


hope that was clear.

Basically as you see, 3 will cover up 1 if you push either host or join but I still need to be able to have access to 2.

This was an example of how I tried to use for 1 and 2 each a sheet:

Code: Select all

mEditorGuiSheet = CEGUI::WindowManager::getSingleton().getWindow((CEGUI::utf8*)"Server_Select");
mEditorGuiSheet->addChildWindow((CEGUI::utf8*)"Server_Select/lists");
mEditorGuiSheet->addChildWindow((CEGUI::utf8*)"Server_Select/buttons");

mGUISystem->setGUISheet(mEditorGuiSheet);


from the xml file:

Code: Select all

<Window Type="DefaultWindow" Name="Server_Select">
</Window>
<Window Type="DefaultWindow" Name="Server_Select/buttons">
    < my buttons are added here >
</Window>
<Window Type="DefaultWindow" Name="Server_Select/lists">
    < my lists are created here >
</Window>




I realize I am doing something wrong, for what I want was done in Demo 7, but after trying to mimic it, I still could not get them both activated at the same time (even if one only becomes activated if the mouse is over it).

User avatar
Tzyr
Just popping in
Just popping in
Posts: 7
Joined: Tue Nov 29, 2005 06:42

Re: First window cannot be activated after second is created

Postby Tzyr » Tue Dec 20, 2005 01:34

I was able to find a fix for it.

I put both frames into the same "default window" and when they were told to open, I put frames->show, and I hid the buttons that were underneath. when I closed the frame windows, I then turned the buttons back on and hid the windows.

It works. still curious on how to set it up differently though, but oh well.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 14 guests