summaryrefslogtreecommitdiff
path: root/Runtime/Input/OnScreenKeyboard.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Input/OnScreenKeyboard.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Input/OnScreenKeyboard.h')
-rw-r--r--Runtime/Input/OnScreenKeyboard.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/Runtime/Input/OnScreenKeyboard.h b/Runtime/Input/OnScreenKeyboard.h
new file mode 100644
index 0000000..a828173
--- /dev/null
+++ b/Runtime/Input/OnScreenKeyboard.h
@@ -0,0 +1,47 @@
+#ifndef UNITY_ONSCREEN_KEYBOARD_
+#define UNITY_ONSCREEN_KEYBOARD_
+
+#include "Runtime/Math/Color.h"
+#include "Runtime/Math/Rect.h"
+#include "Runtime/Graphics/ScreenManager.h"
+
+class KeyboardOnScreen
+{
+public:
+
+ static Rectf GetRect();
+ static bool IsVisible();
+
+ static void Hide();
+ static void setInputHidden(bool flag);
+ static bool isInputHidden();
+
+public:
+ KeyboardOnScreen(std::string const& text, UInt32 keyboardType = 0,
+ bool autocorrection = true, bool multiline = false,
+ bool secure = false, bool alert = false,
+ std::string const& textPlaceholder = "");
+ ~KeyboardOnScreen();
+ bool isActive() const;
+ bool isDone() const;
+ bool wasCanceled() const;
+ std::string getText() const;
+ void setText(std::string text);
+ void setActive(bool flag = true);
+
+private:
+ #if UNITY_WP8
+ static BridgeInterface::IWP8Keyboard^ ms_Keyboard;
+ BridgeInterface::IWP8Keyboard^ m_Keyboard;
+ #endif
+ ColorRGBA32 textColor;
+ ColorRGBA32 backgroundColor;
+ UInt32 keyboardType;
+ std::string textPlaceholder;
+ bool autocorrection;
+ bool multiline;
+ bool secure;
+ bool alert;
+};
+
+#endif