Mac OS X - Mouse Events
Posted: Wed May 18, 2011 15:12
Hi there,
I hope I am not totally wrong here with my issue I am writing a little test game and want it to run on Windows and Mac OS X as well (maybe linux too, later ^^). I'm using Ogre3D (1.7.2), CEGUI (0.7.5) and OIS (don't know the exact version) and it works great on Windows.
I also got it running on Mac OS X after having some startup problems, missing the PlugInBundle Folder content etc. ^^ Now it starts, and my Software Mouse Cursor moves correctly (it is displayed at the correct position, so i guess CEGUI gets the correct information from OIS) BUT my button controls don't do anything... I can't click them... They don't highlight on mouseover and so on. On windows, anything seems to be okay.
Screenshot in windows with button down
(The cursor is hidden here because I use the hardware cursor in windows and hide the CEGUI Software cursor)
Screenshot in Mac OS X - Button does not react in any way
And maybe some code...?
(this method is called correctly, I logged to check)
Any suggestions?
I hope I am not totally wrong here with my issue I am writing a little test game and want it to run on Windows and Mac OS X as well (maybe linux too, later ^^). I'm using Ogre3D (1.7.2), CEGUI (0.7.5) and OIS (don't know the exact version) and it works great on Windows.
I also got it running on Mac OS X after having some startup problems, missing the PlugInBundle Folder content etc. ^^ Now it starts, and my Software Mouse Cursor moves correctly (it is displayed at the correct position, so i guess CEGUI gets the correct information from OIS) BUT my button controls don't do anything... I can't click them... They don't highlight on mouseover and so on. On windows, anything seems to be okay.
Screenshot in windows with button down
(The cursor is hidden here because I use the hardware cursor in windows and hide the CEGUI Software cursor)
Screenshot in Mac OS X - Button does not react in any way
And maybe some code...?
Code: Select all
bool Game::mouseMoved(const OIS::MouseEvent &arg)
{
// Inject mouse movement
m_pGUISystem->injectMousePosition((float)arg.state.X.abs, (float)arg.state.Y.abs);
//m_pGUISystem->injectMouseMove((float)arg.state.X.rel, (float)arg.state.Y.rel);
// Same result with both calls above on Mac OS X... correct CEGUI::MouseCursor position but no reaction from the buttons
// Update active game state
if (m_pActiveState)
m_pActiveState->mouseMoved(arg);
return true;
}
(this method is called correctly, I logged to check)
Code: Select all
bool Game::mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id)
{
m_pGUISystem->injectMouseButtonDown((CEGUI::MouseButton)id);
// Update active game state
if (m_pActiveState)
m_pActiveState->mousePressed(arg, id);
return true;
}
Code: Select all
bool Game::mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id)
{
m_pGUISystem->injectMouseButtonUp((CEGUI::MouseButton)id);
// Update active game state
if (m_pActiveState)
m_pActiveState->mouseReleased(arg, id);
return true;
}
Any suggestions?