public override void OnShiftKeyboard() { if (Locale_Keyboards == null) { #if UNITY_EDITOR Debug.Log(LOG_TAG + ", OnShiftKeyboard() no keyboards registered!!"); #endif return; } bool _has_active_keyboard = false; // No need to record instances of all keyboard, just looping to check all registered keyboard. for (int _ui = 0; _ui < Locale_Keyboards.Count; _ui++) { if (KMInstance.IsKeyboardActive <Type_ENG> (KeyboardLanguage.English, Locale_Keyboards [_ui].Type)) { int _next = (_ui + 1) % Locale_Keyboards.Count; DeactivateKeyboard(Locale_Keyboards [_ui].Type); ActivateKeyboard(Locale_Keyboards [_next].Type); _has_active_keyboard = true; break; } } if (!_has_active_keyboard) { ActivateKeyboard(Locale_Keyboards [0].Type); } }
private void DeactivateKeyboard(Type_ENG kb) { #if UNITY_EDITOR Debug.Log(LOG_TAG + ", DeactivateKeyboard() " + kb); #endif KMInstance.ActivateKeyboard <Type_ENG> (KeyboardLanguage.English, kb, false); }
private void DeactivateKeyboard(Type_SYM kb) { #if UNITY_EDITOR Debug.Log(LOG_TAG + ", DeactivateKeyboard() " + kb); #endif KMInstance.ActivateKeyboard <Type_SYM> (KeyboardLanguage.Symbol, kb, false); }
/// <summary> /// Activate the keyboard of English. Only activated keyboard will be shown. /// </summary> private void ActivateKeyboard(Type_ENG kb) { #if UNITY_EDITOR Debug.Log(LOG_TAG + ", ActivateKeyboard() " + kb); #endif KMInstance.ActivateKeyboard <Type_ENG> (KeyboardLanguage.English, kb, true); curKeyboard = kb; }
public English(InputFieldManager ifm, bool ispw) : base(ifm, ispw) { Locale_Keyboards = KMInstance.GetLocaleKeyboards <Type_ENG> (KeyboardLanguage.English); if (Locale_Keyboards != null) { foreach (Type_ENG _type in EnumUtil.GetValues <Type_ENG>()) { foreach (CKeyboard <Type_ENG> _kb in Locale_Keyboards) { if (_type == _kb.Type) { #if UNITY_EDITOR Debug.Log(LOG_TAG + ", English() default keyboard is " + _type); #endif curKeyboard = _type; goto ConstructorCompleted; } } } } ConstructorCompleted: ; }