HI ,
can we able to access the button click event with our using the cursor ?..Actually These are the steps i followed the for 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 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 calling .. Please provide me any sample code . Am not using any cursor for the click
Please tell me do i need to add anything , ami doing in a wrong way .. Plz help me
Thanks in advance
click event of button
-
- Kobold
- Posts: 31
- Joined: Thu Feb 02, 2012 9:34 pm
- x 6
Re: click event of button
SDKtrays uses the cursor position to hit-test a button even if you have hidden the cursor. You can test this by making the cursor visible. You will see, you have to "drag" the cursor over the button in order for a "tap" event to be raised.