Don't show screen keyboard when hardware keyboard is available

This commit is contained in:
Deve 2018-03-03 21:06:59 +01:00
parent 41ba4395d9
commit 975fc8f84a

View File

@ -23,6 +23,10 @@
#include "../../../lib/irrlicht/include/IrrCompileConfig.h"
#include "../../../lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.h"
#ifdef ANDROID
#include "../../../lib/irrlicht/source/Irrlicht/CIrrDeviceAndroid.h"
#endif
/*
todo:
optional scrollbars
@ -1255,12 +1259,24 @@ bool CGUIEditBox::processMouse(const SEvent& event)
}
else if (!m_rtl)
{
bool use_screen_keyboard = UserConfigParams::m_screen_keyboard;
#ifdef ANDROID
int32_t keyboard = AConfiguration_getKeyboard(
global_android_app->config);
if (keyboard == ACONFIGURATION_KEYBOARD_QWERTY)
{
use_screen_keyboard = false;
}
#endif
if (!AbsoluteClippingRect.isPointInside(
core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y)))
{
return false;
}
else if (UserConfigParams::m_screen_keyboard)
else if (use_screen_keyboard)
{
CursorPos = Text.size();
setTextMarkers(CursorPos, CursorPos);