private void RenameGroup(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text))
            {
                if (this.currGroupIdx >= 0 && ((GroupedDataGroup <ItemT>)(object) this.groupedData.groups[this.currGroupIdx]).ident.Equals(text))
                {
                    return;
                }
                if (!this.groupedData.GroupNameIsUnique(text))
                {
                    EditorUtility.DisplayDialog("Rename Group", "The group name must be unique", "OK");
                }
                else
                {
                    ((GroupedDataGroup <ItemT>)(object) this.groupedData.groups[this.currGroupIdx]).ident = text;
                    Action obj = this.onGroupChanged;
                    if (obj != null)
                    {
                        obj();
                    }
                    this.RefreshGroupLabels();
                }
            }
        }
Beispiel #2
0
        private void AddDataProvider(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (string.IsNullOrEmpty(text))
            {
                this.isNewlyCreated    = true;
                this.bind.dataprovider = DataProviderEd.CreateDataprovider <plyVarDataProvider>("", this.isForSetter);
                plyEdUtil.SetDirty(this.bindOwner);
                this.CreateProviderEd();
            }
            else if (this.NameIsUniqueInDefined(text))
            {
                this.isNewlyCreated    = true;
                this.bind.dataprovider = DataProviderEd.CreateDataprovider <plyVarDataProvider>(text, this.isForSetter);
                plyEdUtil.SetDirty(this.bindOwner);
                this.CreateProviderEd();
            }
            else
            {
                EditorUtility.DisplayDialog("Create", "The name must be unique.", "OK");
            }
            base.Repaint();
        }
        private void AddGroup(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text))
            {
                if (!this.groupedData.GroupNameIsUnique(text))
                {
                    EditorUtility.DisplayDialog("Add Group", "The group name must be unique", "OK");
                }
                else
                {
                    this.groupedData.CreateGroup(text);
                    Action obj = this.onGroupChanged;
                    if (obj != null)
                    {
                        obj();
                    }
                    this.currGroupIdx   = this.groupedData.groups.Count - 1;
                    this.currList       = ((GroupedDataGroup <ItemT>)(object) this.groupedData.groups[this.currGroupIdx]).items;
                    this.orderList.list = this.currList;
                    this.RefreshGroupLabels();
                }
            }
        }
Beispiel #4
0
        private void PropertiesList_DoRename(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            PropertiesManagerEd.RenameProperty(this.propertiesList.index, text);
            base.editorWindow.Repaint();
        }
Beispiel #5
0
        private void PropertiesList_OnAdd(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            PropertiesManagerEd.AddProperty(text);
            base.editorWindow.Repaint();
        }
Beispiel #6
0
        private void OnRenameScene(plyTextInputWiz wiz)
        {
            int    num  = (int)wiz.args[0];
            string text = wiz.text;

            wiz.Close();
            if (num != -1 && !string.IsNullOrEmpty(text))
            {
                string text2 = AssetDatabase.RenameAsset(EditorBuildSettings.scenes[num].path, text);
                if (!string.IsNullOrEmpty(text2))
                {
                    EditorUtility.DisplayDialog("Error", text2, "Close");
                }
                base.editorWindow.Repaint();
            }
        }
Beispiel #7
0
        private void OnRenameBloxDef(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text))
            {
                BloxEd.BloxGlobalObj.bloxDefs[this.selectedBloxIdx].screenName = text;
                plyEdUtil.SetDirty(BloxEd.BloxGlobalObj.bloxDefs[this.selectedBloxIdx]);
                BloxEd.SortBloxDefList();
                base.Repaint();
                BloxEditorWindow instance = BloxEditorWindow.Instance;
                if ((object)instance != null)
                {
                    instance.Repaint();
                }
                plyEdUtil.RepaintInspector(typeof(BloxContainer));
            }
        }
Beispiel #8
0
        private void Item_Rename(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text) && !text.Equals(((GroupedDataItem)(object)((GroupedDataGroup <ItemT>)(object) this.groupedData.groups[this.listEd.currGroupIdx]).items[this.listEd.index]).ident))
            {
                if (this.groupedData.ItemNameIsUnique(text))
                {
                    ((GroupedDataItem)(object)((GroupedDataGroup <ItemT>)(object) this.groupedData.groups[this.listEd.currGroupIdx]).items[this.listEd.index]).ident = text;
                    this.Save();
                }
                else
                {
                    EditorUtility.DisplayDialog("Rename Entry", "The name must be unique.", "OK");
                }
            }
            this.editorWindow.Repaint();
        }
Beispiel #9
0
        private void Item_Add(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text))
            {
                if (this.groupedData.ItemNameIsUnique(text))
                {
                    this.groupedData.CreateItem(text, this.groupedData.groups[this.listEd.currGroupIdx]);
                    this.Save();
                }
                else
                {
                    EditorUtility.DisplayDialog("Add Entry", "The name must be unique.", "OK");
                }
            }
            this.editorWindow.Repaint();
        }
        private void OnRenameVariable(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text) && !text.Equals(this.variables.varDefs[this.varsList.index].name))
            {
                if (plyEdUtil.StringIsUnique(this.variables.varDefs, text))
                {
                    this.variables.varDefs[this.varsList.index].name = text;
                    this.Save();
                }
                else
                {
                    EditorUtility.DisplayDialog("Variables", "The variable name must be unique.", "OK");
                }
            }
            this.repaint();
        }
Beispiel #11
0
        private void RenameDataProvider(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text) && !text.Equals(this.bind.dataprovider.ident))
            {
                if (this.NameIsUniqueInDefined(text))
                {
                    this.bind.dataprovider.ident = text;
                    plyEdUtil.SetDirty(this.bind.dataprovider);
                    DataProviderEd.UpdateProviderLabels();
                }
                else
                {
                    EditorUtility.DisplayDialog("Rename", "The name must be unique.", "OK");
                }
                base.Repaint();
            }
        }
Beispiel #12
0
        private void OnRenameBloxDef(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text))
            {
                this.targetBloxCache[this.list.index].screenName = text;
                plyEdUtil.SetDirty(this.targetBloxCache[this.list.index]);
                BloxEd.SortBloxDefList();
                base.Repaint();
                BloxListWindow instance = BloxListWindow.Instance;
                if ((object)instance != null)
                {
                    instance.Repaint();
                }
                BloxEditorWindow instance2 = BloxEditorWindow.Instance;
                if ((object)instance2 != null)
                {
                    instance2.Repaint();
                }
            }
        }
Beispiel #13
0
        private void OnRenameVariable(plyTextInputWiz wiz)
        {
            string text = wiz.text;

            wiz.Close();
            if (!string.IsNullOrEmpty(text) && !text.Equals(this.blox.variables.varDefs[this.selected].name))
            {
                if (plyEdUtil.StringIsUnique(this.blox.variables.varDefs, text))
                {
                    this.blox.variables.varDefs[this.selected].name = text;
                    this.Save();
                    BloxContainerInspector instance = BloxContainerInspector.Instance;
                    if ((object)instance != null)
                    {
                        instance.OnBloxVariablesChanged(this.blox.ident);
                    }
                }
                else
                {
                    EditorUtility.DisplayDialog("Variables", "The variable name must be unique.", "OK");
                }
            }
            this.ed.Repaint();
        }