I'm using this piece of code to inject mouse left button press in my CEGUI widget:
Code: Select all
curr_button_ref = ref->recursiveChildSearch(mt_curr_btn_name);
CEGUI::Rect r = curr_button_ref->getPixelRect();
CEGUI::System::getSingleton().injectMousePosition(r.d_left, r.d_top);
CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);
CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);
It works well but I can't see the button animation (pressed and released)...I suppose that there must be a sort of timer to handle the down and up event in a good way...how can I solve this problem?
Thanks.