1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Drop old text input workarounds (#11089)

* Drop unused intlGUIEditBox

* Drop unnecessary Linux text input workarounds
This commit is contained in:
sfan5 2021-03-19 18:44:32 +01:00 committed by GitHub
parent 285ba74723
commit 96d4df995c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 745 deletions

View file

@ -208,31 +208,10 @@ bool GUIEditBox::OnEvent(const SEvent &event)
}
}
break;
case EET_KEY_INPUT_EVENT: {
#if (defined(__linux__) || defined(__FreeBSD__)) || defined(__DragonFly__)
// ################################################################
// ValkaTR:
// This part is the difference from the original intlGUIEditBox
// It converts UTF-8 character into a UCS-2 (wchar_t)
wchar_t wc = L'_';
mbtowc(&wc, (char *)&event.KeyInput.Char,
sizeof(event.KeyInput.Char));
// printf( "char: %lc (%u) \r\n", wc, wc );
SEvent irrevent(event);
irrevent.KeyInput.Char = wc;
// ################################################################
if (processKey(irrevent))
return true;
#else
case EET_KEY_INPUT_EVENT:
if (processKey(event))
return true;
#endif // defined(linux)
break;
}
case EET_MOUSE_INPUT_EVENT:
if (processMouse(event))
return true;