mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
2332527765
commit
85163b531f
4 changed files with 51 additions and 27 deletions
|
@ -17,6 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#include "guiChatConsole.h"
|
||||
#include "chat.h"
|
||||
#include "client/client.h"
|
||||
|
@ -618,6 +619,13 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
|
|||
m_chat_backend->scroll(rows);
|
||||
}
|
||||
}
|
||||
#if (IRRLICHT_VERSION_MT_REVISION >= 2)
|
||||
else if(event.EventType == EET_STRING_INPUT_EVENT)
|
||||
{
|
||||
prompt.input(std::wstring(event.StringInput.Str->c_str()));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return Parent ? Parent->OnEvent(event) : false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue