Other windows gone?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Other windows gone?

Postby Levia » Mon May 22, 2006 20:52

Hey,

As soon as I create a window like

Code: Select all

m_RootWindow = CEGUI::System::getSingleton().getGUISheet();
   
   // Now we are gonna create zeh window.
   // We must do this.
   CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();

   // We want a framewindow I guess.
   CEGUI::FrameWindow* m_FrameWnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "TEst/MainWindow");

   // Setting the layout.
   m_FrameWnd = (CEGUI::FrameWindow*)CEGUI::WindowManager::getSingleton().loadWindowLayout("wnd.layout");
   CEGUI::System::getSingleton().setGUISheet(m_FrameWnd);
 
   m_FrameWnd->setPosition(CEGUI::Point(0.00f, 0.35f));
   
   // Add to root.
   m_RootWindow->addChildWindow(m_FrameWnd);


All other CEGUI windows disappear. Im not sure what ive done wrong. Im using CEGUI from yake(with ogre3d and such)

layout

Code: Select all

<?xml version="1.0" ?>
<GUILayout>
<Window Type="TaharezLook/FrameWindow" Name="Map/Main">
   <Property Name="Size" Value="w:0.25 h:1" />
   <Property Name="Position" Value="x:0.75 y:0" />
   <Property Name="DragMovingEnabled" Value="false" />
   <Property Name="RollUpEnabled" Value="true" />
   <Property Name="CloseButtonEnabled" Value="false" />
   <Property Name="Text" Value="Mapviewer" />

   <Window Type="TaharezLook/Combobox" Name="Map/MeshBox">
      <Property Name="Position" Value="x:0.05 y:0.05" />
      <Property Name="Size" Value="w:0.9 h:0.3" />
      <Property Name="Text" Value="Testing" />
      <Property Name="ClippedByParent" Value="false" />
      <Property Name="ReadOnly" Value="true" />         
   </Window>
</Window>
</GUILayout>


Could someone please tell me what I have done wrong?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Mon May 22, 2006 21:59

It looks like it's because of this line:

Code: Select all

CEGUI::System::getSingleton().setGUISheet(m_FrameWnd);


That "overwrites" your root.

Removing this line should fix your problem. I am however not sure what you mean by "other windows". Or did you only paste a bit of your code?

HTH.

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Tue May 23, 2006 10:17

Im working on oF (openfrag) and it has its own core, it creates a CEGUI version window under every app made in oF.

The window doesnt disappear now. Thanks, should have thought of this myself.

Now I have another problem though..the window doesnt seem to be using the imageset from TaharezLook. Ive set it in the scheme, and everythings ok, but the window looks green. I thought it should be like
http://www.yake.org//images/zoom/Screen ... CEGUI3.jpg
This one. Only buttons look right.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue May 23, 2006 15:56

Hi,

Good to hear that works now :-)

The green window comes from Ogre, which is not a CEGUI window, but an Ogre layout (Core/DebugOverlay). So that's okay.

I'm not sure whether your screenshot is how it looks, or how it *should* look. Can you post your 'wrong' image too? Thanks.

Good luck.

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Tue May 23, 2006 16:09



Return to “Help”

Who is online

Users browsing this forum: No registered users and 29 guests