summaryrefslogtreecommitdiff
path: root/src/gui/guiEditBox.h
diff options
context:
space:
mode:
authoryw05 <37980625+yw05@users.noreply.github.com>2021-04-05 15:56:29 +0200
committerGitHub <noreply@github.com>2021-04-05 15:56:29 +0200
commit85163b531f283c52111c3964fd382e4ed1dafeb8 (patch)
tree4d49b0720fe784b30b7566113018fdf4d0213f7d /src/gui/guiEditBox.h
parent23325277659132e95b346307b591c944625bda16 (diff)
downloadminetest-85163b531f283c52111c3964fd382e4ed1dafeb8.tar.gz
minetest-85163b531f283c52111c3964fd382e4ed1dafeb8.tar.bz2
minetest-85163b531f283c52111c3964fd382e4ed1dafeb8.zip
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.
Diffstat (limited to 'src/gui/guiEditBox.h')
-rw-r--r--src/gui/guiEditBox.h3
1 files changed, 3 insertions, 0 deletions
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