If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
giuseppegam
Posts: 39 Joined: Thu Jan 11, 2007 2:45 am
Post
by giuseppegam » Thu Sep 11, 2008 2:15 pm
Hi, plase help, y event receiver is receiving Input Key Event doubled.
Code: Select all
if (event.EventType == irr::EET_KEY_INPUT_EVENT&&!event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_RETURN:
guienv->addMessageBox(L"Error",L"1",0,EMBF_OK);
break;
}
}
I get two windows writing 1
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Thu Sep 11, 2008 2:17 pm
I don't know whether it will help but instead of 'break' you should return true...
CuteAlien
Admin
Posts: 9734 Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:
Post
by CuteAlien » Thu Sep 11, 2008 2:22 pm
There was a bug that key-events got send twice when an element had the focus. It got fixed just a few days ago in svn, so it will probably be working in 1.5
giuseppegam
Posts: 39 Joined: Thu Jan 11, 2007 2:45 am
Post
by giuseppegam » Thu Sep 11, 2008 2:31 pm
JP wrote: I don't know whether it will help but instead of 'break' you should return true...
His solution satisfied, thank you