From 85163b531f283c52111c3964fd382e4ed1dafeb8 Mon Sep 17 00:00:00 2001 From: yw05 <37980625+yw05@users.noreply.github.com> Date: Mon, 5 Apr 2021 15:56:29 +0200 Subject: Make edit boxes respond to string input (IME) (#11156) Make edit boxes respond to string input events (introduced in minetest/irrlicht#23) that are usually triggered by entering text with an IME. --- src/gui/guiEditBox.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/guiEditBox.h') diff --git a/src/gui/guiEditBox.h b/src/gui/guiEditBox.h index c616d75d1..2a5c911bc 100644 --- a/src/gui/guiEditBox.h +++ b/src/gui/guiEditBox.h @@ -138,6 +138,8 @@ public: virtual void deserializeAttributes( io::IAttributes *in, io::SAttributeReadWriteOptions *options); + virtual bool acceptsIME() { return isEnabled() && m_writable; }; + protected: virtual void breakText() = 0; @@ -156,6 +158,7 @@ protected: virtual s32 getCursorPos(s32 x, s32 y) = 0; bool processKey(const SEvent &event); + virtual void inputString(const core::stringw &str); virtual void inputChar(wchar_t c); //! returns the line number that the cursor is on -- cgit v1.2.3