コード例 #1
0
        public void UpdateActiveTranslation()
        {
            var    activeLang = ContextMenuController.GetActiveLanguageCode();
            string val;

            if (m_translations.TryGetValue(activeLang, out val))
            {
                m_InputField.text = val;
            }
        }
コード例 #2
0
        void EditingEnded(string userInput)
        {
            if (!m_InputField.wasCanceled)
            {
                m_translations["en"] = userInput;
                LabelManager.Instance.TranslateAll(ContextMenuController.GetActiveLanguageCode());

                if (IsNew)
                {
                    OnNewItemEditEnded();
                }
                else
                {
                    OnItemEditEnded();
                }
            }
            else
            {
                LabelManager.Instance.RemoveLabel(InputManager.Instance.m_SelectedObject.GetGameObject());
                InputManager.Instance.m_SelectedObject = null;
            }
        }
コード例 #3
0
 public void LanguageClicked()
 {
     m_MenuController.ToggleLanguage();
     LabelManager.Instance.TranslateAll(ContextMenuController.GetActiveLanguageCode());
 }