Exemple #1
0
        public bool InspectInList(IList list, int ind, ref int edited)
        {
            var changed = false;

            CountForInspector().ToString().edit(60, ref dataExplorer.tag).changes(ref changed);

            if (Cfg != null)
            {
                if (icon.Load.ClickConfirm("sfgLoad", "Decode Data into " + Cfg.GetNameForInspector()).changes(ref changed))
                {
                    dataExplorer.UpdateData();
                    Cfg.Decode(dataExplorer.data);
                }
                if (icon.Save.ClickConfirm("cfgSave", "Save data from " + Cfg.GetNameForInspector()).changes(ref changed))
                {
                    dataExplorer = new ExploringCfg(dataExplorer.tag, Cfg.Encode().ToString());
                }
            }

            if (icon.Enter.Click(comment))
            {
                edited = ind;
            }

            return(changed);
        }
Exemple #2
0
        public bool Inspect()
        {
            bool changed = false;


            if (dataExplorer.inspectedTag == -1)
            {
                this.inspect_Name();
                if (Cfg != null && dataExplorer.tag.Length > 0 && icon.Save.Click("Save To Assets", ref changed))
                {
                    QcFile.SaveUtils.SaveBytesToAssetsByRelativePath(Mgmt.fileFolderHolder, dataExplorer.tag, dataExplorer.data);
                    QcUnity.RefreshAssetDatabase();
                }

                pegi.nl();

                if (Cfg != null)
                {
                    if (dataExplorer.tag.Length == 0)
                    {
                        dataExplorer.tag = Cfg.GetNameForInspector() + " config";
                    }

                    "Save To:".edit(50, ref Mgmt.fileFolderHolder).changes(ref changed);

                    var uObj = Cfg as UnityEngine.Object;

                    if (uObj && icon.Done.Click("Use the same directory as current object.", ref changed))
                    {
                        Mgmt.fileFolderHolder = QcUnity.GetAssetFolder(uObj);
                    }

                    uObj.ClickHighlight().nl(ref changed);
                }


                "Comment:".editBig(ref comment).nl(ref changed);
            }

            dataExplorer.Nested_Inspect().changes(ref changed);

            return(changed);
        }