Button click event in the Ogre3d for ios
Posted
by
user1184398
on Game Development
See other posts from Game Development
or by user1184398
Published on 2012-04-03T07:07:13Z
Indexed on
2012/04/03
11:42 UTC
Read the original article
Hit count: 275
Is it possible to access the button click event by using the cursor?
These are the steps I followed for the button click event using the SDK trays
m_pTrayMgr = new OgreBites::SdkTrayManager("TrayMgr", m_pRenderWnd, m_pMouse, this);
I create the buttons
m_LeftBtn = tray->createButton(OgreBites:: TL_LEFT, "sdk_button_down", "Left");
m_RightBtn = tray->createButton(OgreBites::TL_RIGHT, "sdk_button_up", "Right");
And I am calling this function
void OgreFramework::buttonHit(OgreBites::Button* button)
{
if(button->getName().compare("sdk_button_down") == 0 )
{
printf("XXX");
}
}
But the button hit function is not getting called... Could somebody provide some sample code? I'm not using any cursor for the click.
© Game Development or respective owner