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

@ -34,7 +34,11 @@ namespace irr
IrrlichtDevice::postEventFromUser. They take the same path as mouse events. */
EET_KEY_INPUT_EVENT,
//! A touch input event.
//! A string input event.
/** This event is created when multiple characters are sent at a time (e.g. using an IME). */
EET_STRING_INPUT_EVENT,
//! A touch input event.
EET_TOUCH_INPUT_EVENT,
//! A accelerometer event.
@ -413,7 +417,14 @@ struct SEvent
bool Control:1;
};
//! Any kind of touch event.
//! String input event.
struct SStringInput
{
//! The string that is entered
core::stringw *Str;
};
//! Any kind of touch event.
struct STouchInput
{
// Touch ID.
@ -581,6 +592,7 @@ struct SEvent
struct SGUIEvent GUIEvent;
struct SMouseInput MouseInput;
struct SKeyInput KeyInput;
struct SStringInput StringInput;
struct STouchInput TouchInput;
struct SAccelerometerEvent AccelerometerEvent;
struct SGyroscopeEvent GyroscopeEvent;

View File

@ -789,6 +789,13 @@ public:
}
//! Returns whether the element takes input from the IME
virtual bool acceptsIME()
{
return false;
}
//! Writes attributes of the scene node.
/** Implement this to expose the attributes of your scene node for
scripting languages, editors, debuggers or xml serialization purposes. */