Prepare GUI for IME support

This commit is contained in:
yw05
2021-03-30 13:52:45 +02:00
committed by sfan5
parent d7127df9f8
commit 32004b9c5f
7 changed files with 122 additions and 56 deletions

View File

@ -6,6 +6,7 @@
#include "ISceneManager.h"
#include "IEventReceiver.h"
#include "IFileSystem.h"
#include "IGUIElement.h"
#include "IGUIEnvironment.h"
#include "os.h"
#include "IrrCompileConfig.h"
@ -503,6 +504,14 @@ void CIrrDeviceStub::clearSystemMessages()
{
}
//! Checks whether the input device should take input from the IME
bool CIrrDeviceStub::acceptsIME()
{
if (!GUIEnvironment)
return false;
gui::IGUIElement *elem = GUIEnvironment->getFocus();
return elem && elem->acceptsIME();
}
} // end namespace irr