diff options
Diffstat (limited to 'Runtime/Input/OnScreenKeyboard.h')
-rw-r--r-- | Runtime/Input/OnScreenKeyboard.h | 47 |
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 |