mouse cursonr won't display

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
CannibalSmith
Just popping in
Just popping in
Posts: 2
Joined: Mon Aug 29, 2005 15:57
Contact:

mouse cursonr won't display

Postby CannibalSmith » Tue Aug 30, 2005 11:11

As I understand this should be sufficient to get the cursor rendering:

Code: Select all

CEGUI::System::getSingleton.setDefaultMouseCursor("TaharezLook", "MouseArrow");

But for me it won't diplay even after:

Code: Select all

CEGUI::MouseCursor::getSingleton().show();
Sarcastically speaking CEGUI's source code is the best documentation it has.

User avatar
Blakharaz
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Wed Jan 12, 2005 12:06
Location: Potsdam, Germany
Contact:

Re: mouse cursonr won't display

Postby Blakharaz » Tue Aug 30, 2005 15:20

Do you inject mouse movement into CEGUI? IMHO the pointer isn't rendered if you never move the mouse.
Coder in the Pantheon Team - creators of "Rastullahs Lockenpracht" (http://www.rastullahs-lockenpracht.de/)

User avatar
CannibalSmith
Just popping in
Just popping in
Posts: 2
Joined: Mon Aug 29, 2005 15:57
Contact:

Re: mouse cursonr won't display

Postby CannibalSmith » Tue Aug 30, 2005 16:27

It helps:

Code: Select all

void MyOwnFrameListener::mouseMoved(Ogre::MouseEvent *e)
{
    CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * 100, e->getRelY() * 100);
}


But sensitivity is very small. Even with when I multiply movement by 100 the pointer is very slow... it's okay? Or is there some very cool way to do this?
Sarcastically speaking CEGUI's source code is the best documentation it has.

User avatar
Viper
Just popping in
Just popping in
Posts: 16
Joined: Mon Aug 29, 2005 01:27
Location: US
Contact:

Re: mouse cursonr won't display

Postby Viper » Thu Sep 01, 2005 02:57

In my game, I track the absolute position of the mouse cursor and inject that and it works fine. You may want to try:

Code: Select all

void MyOwnFrameListener::mouseMoved(Ogre::MouseEvent *e)
{
    CEGUI::System::getSingleton().injectMousePosition(XPos,YPos);
}

I am not very familiar with Ogre, so I do not know if it has a built in method for getting the absolute position of the mouse or if you have to track it. I use DirectX and track the absolute position on my own by adding the relative to the absolute each time I read it, then inject it into ceGUI.

User avatar
Blakharaz
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Wed Jan 12, 2005 12:06
Location: Potsdam, Germany
Contact:

Re: mouse cursonr won't display

Postby Blakharaz » Thu Sep 01, 2005 08:30

I fear, factor 100 is too small. CEGUI wants to have pixel coordinates for the movements.
You'll have to use something like

Code: Select all

CEGUI::Renderer* renderer  = System::getSingleton().getRenderer();

System::getSingleton().injectMouseMove(
   e->getRelX() * renderer->getWidth(),
   e->getRelY() * renderer->getHeight());
Coder in the Pantheon Team - creators of "Rastullahs Lockenpracht" (http://www.rastullahs-lockenpracht.de/)


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 17 guests