protected virtual void Update() { if (ImeApiPlugin.ime_is_open()) { UpdateImeUI(); } }
public virtual void OnButtonClicked() { if (key != Keys.None) { ImeApiPlugin.ime_simulate_key((int)key); } }
public override void OnInputUpdated(uint prev_buttons, uint buttons, bool isShift = false) { if (m_CurrentStateId == -1) { return; } // InputTransform inputMapping = isShift?m_ShiftInputMappings[m_CurrentStateId]:m_InputMappings[m_CurrentStateId]; if (inputMapping != null) { int buttonMask; for (int i = 0, imax = inputMapping.buttonMasksFrom.Length; i < imax; ++i) { buttonMask = inputMapping.buttonMasksFrom[i]; // if ((prev_buttons & buttonMask) == 0 && (buttons & buttonMask) != 0) // Down // { ImeApiPlugin.ime_simulate_key(inputMapping.buttonMasksTo[i]); } else if ((prev_buttons & buttonMask) != 0 && (buttons & buttonMask) == 0) // Up // { } } } }
public virtual void CheckImeOpened() { bool isOpened = ImeApiPlugin.ime_is_open(); if (isOpened != m_SelfActive) { m_Go.SetActive(m_SelfActive = isOpened); } }
protected virtual void OnDestroy() { if (!CheckPlatform()) { return; } // ImeApiPlugin.ime_exit(); }
protected virtual void Start() { if (!CheckPlatform()) { Destroy(gameObject); return; } // ImeApiPlugin.ime_init(); m_Go = gameObject; m_SelfActive = m_Go.activeSelf; Juggler.Main.UpdateCall(CheckImeOpened, 0.0f, float.MaxValue); InitImeUI(); }
public virtual void UpdateImeUI() { ClearImeUI(); string str; // str = ImeApiPlugin.ime_get_composition_string(); if (m_CompositionText != null) { m_CompositionText.text = str; } // int i = 0, imax = ImeApiPlugin.ime_get_candidate_list_count(); for (; i < imax; ++i) { str = ImeApiPlugin.ime_get_candidate_list_item(i); AddCandidate(i, str); } }