Beispiel #1
0
        public override void OnAdded(UI ui, ModData data_, TreeItem root)
        {
            var data = data_ as ContentPatcherModData;

            if (root == roots["Configuration Entries"])
            {
                var configToken = new ConfigToken()
                {
                    Name = "ConfigToken",
                };
                data.ConfigTokens.Add(configToken);

                var item = ui.ProjectTree.CreateItem(root);
                item.SetText(0, "ConfigToken");
                item.AddButton(0, ui.RemoveIcon, UI.REMOVE_BUTTON_INDEX, tooltip: "Remove this configuration entry");
                item.SetMeta(Meta.CorrespondingController, MOD_UNIQUE_ID);
                configs.Add(item, configToken);
            }
        }
        public void DoConfigTokenEditorConnections(Node editor, TreeItem entry)
        {
            activeConfig = configs[entry];

            DoEditorConnections(editor, activeConfig);
        }