mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
* VCAI: can't request actions from action handling thread
* Save game screen and returning to main menu will work if game was started with --start option * GUI controls can selectively capture keyboard events. CTextInput won't capture Enter. Fixes #654.
This commit is contained in:
@ -168,7 +168,7 @@ void CGuiHandler::handleEvent(SDL_Event *sEvent)
|
||||
bool keysCaptured = false;
|
||||
for(std::list<CIntObject*>::iterator i=keyinterested.begin(); i != keyinterested.end() && current; i++)
|
||||
{
|
||||
if((*i)->captureAllKeys)
|
||||
if((*i)->captureThisEvent(key))
|
||||
{
|
||||
keysCaptured = true;
|
||||
break;
|
||||
@ -177,7 +177,7 @@ void CGuiHandler::handleEvent(SDL_Event *sEvent)
|
||||
|
||||
std::list<CIntObject*> miCopy = keyinterested;
|
||||
for(std::list<CIntObject*>::iterator i=miCopy.begin(); i != miCopy.end() && current; i++)
|
||||
if(vstd::contains(keyinterested,*i) && (!keysCaptured || (*i)->captureAllKeys))
|
||||
if(vstd::contains(keyinterested,*i) && (!keysCaptured || (*i)->captureThisEvent(key)))
|
||||
(**i).keyPressed(key);
|
||||
}
|
||||
else if(sEvent->type==SDL_MOUSEMOTION)
|
||||
|
Reference in New Issue
Block a user