mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Merge pull request #2996 from Nordsoft91/fix-2992
Capture key event in chat box
This commit is contained in:
@@ -327,6 +327,11 @@ CChatBox::CChatBox(const Rect & rect)
|
||||
chatHistory->label->color = Colors::GREEN;
|
||||
}
|
||||
|
||||
bool CChatBox::captureThisKey(EShortcut key)
|
||||
{
|
||||
return !inputBox->getText().empty() && key == EShortcut::GLOBAL_ACCEPT;
|
||||
}
|
||||
|
||||
void CChatBox::keyPressed(EShortcut key)
|
||||
{
|
||||
if(key == EShortcut::GLOBAL_ACCEPT && inputBox->getText().size())
|
||||
|
||||
Reference in New Issue
Block a user