コード例 #1
0
ファイル: UIGenerator.cs プロジェクト: grashaar/uiman
        private void TypeWindow(int id = 0)
        {
            GUILayout.BeginVertical();

            GUILayout.Space(2);

            GUILayout.EndVertical();

            if (this.searchField == null)
            {
                this.searchField = new UISearchField(OnSearchType, OnClickCreateType);
            }

            this.searchField.Draw();

            if (this.listTypes == null)
            {
                this.listTypes = new UIManTypeListView();
            }

            this.listTypes.SetData(-1, _screenTypes, _dialogTypes, _modelTypes, false, OnSelecType, this.searchField.KeyWord, this);
            this.listTypes.Draw();

            if (_reload && _config != null)
            {
                if (!string.IsNullOrEmpty(_config.selectedType))
                {
                    this.listTypes.Select(_config.selectedType);
                }

                MakePrefab();

                _reload = false;
            }
        }
コード例 #2
0
ファイル: UIGenerator.cs プロジェクト: tranthanhvu/uiman
        void TypeWindow(int id = 0)
        {
            GUILayout.BeginVertical();

            GUILayout.Space(2);

            GUILayout.EndVertical();

            if (searchField == null)
            {
                searchField = new UISearchField(OnSearchType, OnClickCreateType);
            }

            searchField.Draw();

            if (listTypes == null)
            {
                listTypes = new ListView();
            }
            listTypes.SetData(types, false, OnSelecType, searchField.KeyWord, this);
            listTypes.Draw();

            if (reload && config != null)
            {
                if (!string.IsNullOrEmpty(config.selectedType))
                {
                    listTypes.Select(config.selectedType);
                }

                MakePrefab();

                reload = false;
            }
        }
コード例 #3
0
        /// <summary>
        /// Browse for field/property
        /// </summary>
        /// <param name="binderEditor"></param>
        /// <param name="field"></param>
        static public void Browse(string[] items, Action <string> onSelected)
        {
            searchField = new UISearchField(Filter, null, null);
            OnSelected  = onSelected;
            mItems      = items;

            if (items != null && items.Length > 0)
            {
                Popup();
            }
        }
コード例 #4
0
ファイル: FilterPopup.cs プロジェクト: grashaar/uiman
        /// <summary>
        /// Browse for field/property
        /// </summary>
        /// <param name="binderEditor"></param>
        /// <param name="field"></param>
        public static void Browse(int selectedIndex, string[] dataItems, string[] viewItems, Action <string> onSelected)
        {
            selected    = selectedIndex;
            searchField = new UISearchField(Filter, null, null);
            OnSelected  = onSelected;
            mDataItems  = dataItems;
            mViewItems  = viewItems;

            if (dataItems != null && dataItems.Length > 0)
            {
                Popup();
            }
        }