Exemple #1
0
        public static ToDoListFeaturesSubWindow Open(ToDoListFeatureView _inputView, ToDoProduct _productParent,
                                                     string name = "ToDo Feature Editor")
        {
            var window = Open <ToDoListFeaturesSubWindow>(name);

            window.Init(_inputView, null, _productParent, true);
            instance = window;
            window.Show();
            return(window);
        }
Exemple #2
0
        public static ToDoListFeaturesSubWindow Open(ToDoListFeatureView _inputView, ToDoFeature _featureOrParent,
                                                     bool _isCreate, string name = "ToDo Feature Editor")
        {
            var window = Open <ToDoListFeaturesSubWindow>(name);

            window.Init(_inputView, _featureOrParent, null, _isCreate);
            instance = window;
            window.Show();
            return(window);
        }
Exemple #3
0
        private void Init(ToDoListFeatureView _inputView, ToDoFeature _featureParent, ToDoProduct _todoProduct,
                          bool _isCreate)
        {
            inputView       = _inputView;
            isCreate        = _isCreate;
            featureOrParent = _featureParent;
            productParent   = _todoProduct;
            EditorGUI.FocusTextInControl(null);

            if (isCreate)
            {
                nameInputView.Content.Val = string.Empty;
                descInputView.Content.Val = string.Empty;
                saveCreateBtn.Text        = "创建";
            }
            else
            {
                nameInputView.Content.Val = featureOrParent.name;
                descInputView.Content.Val = featureOrParent.description;
                saveCreateBtn.Text        = "保存";
            }
        }