Competing for the Mouse, DirectX vs Ogre/CEGUI

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
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

Competing for the Mouse, DirectX vs Ogre/CEGUI

Postby Van » Tue Apr 18, 2006 01:58

Here is my problem. We use the mouse to move our game pieces. We use DirectX to read the mouse inputs. What I need to know is, is there a way for me to tell if ANY window is ACTIVE and VISIBLE on the screen?

We have a GUISheet always present (it's transparent). All windows are a child of the GUISheet.

Here is what I am trying to do now:

Code: Select all

void clsFPFlightControl::readFlightControlMouse(void)
{
....
   // Don't process mouse stuff if CEGUI has control of the mouse.
   if ( mCEGUISystem->getGUISheet()->getActiveChild()->getName() != "RootSheet" ) return;

...
}



That sort-of works. What happens is, when a CHILD Window becomes active, the mouse works properly (i.e. the RETURN executes), but when the CHILD window is hidden, the above statement still returns the CHILD as being active.

What I am trying to do in code is this statement:

If ONLY the RootSheet is visible, then allow mouse input, otherwise, return. I suspect I am making this more complicated than it needs to be. Any help would be appreciated.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Tue Apr 18, 2006 17:43

This topic may be of help:
http://www.cegui.org.uk/phpBB2/viewtopi ... iningmouse

HTH, otherwise let us know

User avatar
Van
Just can't stay away
Just can't stay away
Posts: 225
Joined: Fri Jan 21, 2005 20:29
Contact:

Postby Van » Sat Apr 22, 2006 16:06

Problem solved.

We stopped using the Ogre inputs and a seperate DirectX input as they were competing with one another. Having two input systems is difficult to manage. We went with a seperate input system and it works great..

OIS - Object Oriented Input System
http://www.wreckedgames.com

[rave]

Supports Windows, Linux, with MAC coming soon. See website for details.
Supports keyboard, mouse, AND joysticks (including force feed back!).
Simple to use.

[/rave]


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests