D3Vil
19-10-2011 12:16:52
Hi folks!
I've already read your tutorial, but I've got a problem with the edit delegation widget.
I'd like to capture a keyboard-press event, but when I delegate the function with MyGUI::newDelegate(....) my events are not catched.
all other events like eventKeyButtonRealesed or eventMouseButtonPressed doesn't work
if instead I use another widget: MyGUI::Button this work and when i click on the button it generates the output on screen correctly.
I've already read your tutorial, but I've got a problem with the edit delegation widget.
I'd like to capture a keyboard-press event, but when I delegate the function with MyGUI::newDelegate(....) my events are not catched.
all other events like eventKeyButtonRealesed or eventMouseButtonPressed doesn't work
if instead I use another widget: MyGUI::Button this work and when i click on the button it generates the output on screen correctly.
MyGUI::Gui::getInstance().findWidget<MyGUI::Edit>("textT")->eventKeyButtonPressed= MyGUI::newDelegate(this,&tGUI::prova);
void tGUI::prova(MyGUI::Widget* _sender,MyGUI::KeyCode _key , MyGUI::Char _char)
{
std::cout<<"hello world"<<std::endl;
}