diff options
author | Thierry Crozat | 2019-02-12 23:48:14 +0000 |
---|---|---|
committer | Thierry Crozat | 2019-02-16 17:20:57 +0000 |
commit | 4795f2b68a4fd7023c2f85a79c1b7686b9226747 (patch) | |
tree | 9f107ee21e2b6bb2357249c99729d116dccbc09e /backends/platform/ios7/ios7_osys_video.mm | |
parent | 63a6a3c3debce1bc843906bf8fa277a1fb75b2d4 (diff) | |
download | scummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.tar.gz scummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.tar.bz2 scummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.zip |
IOS: Implement kFeatureVirtualKeyboard to show/hide the keyboard
Diffstat (limited to 'backends/platform/ios7/ios7_osys_video.mm')
-rw-r--r-- | backends/platform/ios7/ios7_osys_video.mm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm index 3196f88822..20cf687709 100644 --- a/backends/platform/ios7/ios7_osys_video.mm +++ b/backends/platform/ios7/ios7_osys_video.mm @@ -583,3 +583,23 @@ void OSystem_iOS7::updateMouseTexture() { [[iOS7AppDelegate iPhoneView] updateMouseCursor]; }); } + +void OSystem_iOS7::setShowKeyboard(bool show) { + if (show) { + execute_on_main_thread(^ { + [[iOS7AppDelegate iPhoneView] showKeyboard]; + }); + } else { + // Do not hide the keyboard in portrait mode as it is shown automatically and not + // just when asked with the kFeatureVirtualKeyboard. + if (_screenOrientation == kScreenOrientationLandscape || _screenOrientation == kScreenOrientationFlippedLandscape) { + execute_on_main_thread(^ { + [[iOS7AppDelegate iPhoneView] hideKeyboard]; + }); + } + } +} + +bool OSystem_iOS7::isKeyboardShown() const { + return [[iOS7AppDelegate iPhoneView] isKeyboardShown]; +} |