planB
27-08-2010 00:28:14
hi, every one!
in my app, i use ogre_win32 framework and mygui 3.01.
when debug, if i clike widget like a created button, the event function will implement 2 times.
in
and in the mousepressed funtion, i inject mygui mousepressed once.
in my app, i use ogre_win32 framework and mygui 3.01.
when debug, if i clike widget like a created button, the event function will implement 2 times.
in
static LRESULT CALLBACK _WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
, i don't inject any mygui mousepressed function,and in the mousepressed funtion, i inject mygui mousepressed once.
bool BaseApp::mousePressed(const OIS::MouseEvent& evt, OIS::MouseButtonID id)
{
GUIManager::getGUI()->injectMousePress(evt.state.X.abs, evt.state.Y.abs, MyGUI::MouseButton::Enum(id));
if(checkWindowBound(evt) && AppStateManager::GetSingletonPtr()->size())
{
return AppStateManager::GetSingletonPtr()->peekTop()->mousePressed(evt,id);
}
return true;
}