コード例 #1
0
        private static void GetLocationTextList(string testStr)
        {
            textInfoList.Clear();
            if (string.IsNullOrEmpty(testStr))
            {
                textInfoList.Add(0, "不赋值");

                foreach (var location in UILocationAsset.GetAll())
                {
                    if (textInfoList.ContainsKey(location.Key))
                    {
                        //Debug.LogError(location.Key)
                    }

                    else
                    {
                        textInfoList.Add(location.Key, location.Value.Text);
                    }
                }
            }
            else
            {
                foreach (var location in UILocationAsset.GetAll())
                {
                    if (location.Value.Text.Contains(testStr))
                    {
                        textInfoList.Add(location.Key, location.Value.Text);
                    }
                }
            }
        }
コード例 #2
0
        protected new void DrawTextInput()
        {
            EditorGUILayout.Space();

            if (GUILayout.Button(" 刷新表格 "))
            {
                UILocationAsset.Refresh();
            }

            serializedObject.Update();
            EditorGUILayout.LabelField($"当前文本:{mFishText.text}");

            if (GUILayout.Button(" 赋值 "))
            {
                SearchLocationTextWnd.ShowWindow();
            }

            bool show = EditorGUILayout.Toggle("中文竖显", mFishText.showVertical);

            if (mFishText.showVertical != show)
            {
                mFishText.showVertical = show;
            }

            bool addColon = mFishText.addColon = EditorGUILayout.Toggle("添加冒号", mFishText.addColon);

            if (mFishText.addColon != addColon)
            {
                mFishText.addColon = addColon;
            }
        }
コード例 #3
0
        protected override void Awake()
        {
            base.Awake();
            UILocation table = UILocationAsset.Get(m_ID);

            if (table == null)
            {
                return;
            }
            this.text = m_AddColon ? table.Text + ":" : table.Text;
        }
コード例 #4
0
        public static async void ShowWindow()
        {
            await UILocationAsset.Refresh();

            EditorWindow.GetWindow(typeof(SearchLocationTextWnd));
        }