GetBasePrefText() public static method

public static GetBasePrefText ( CurveLibraryType curveLibraryType ) : string
curveLibraryType CurveLibraryType
return string
Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            string basePrefText = CurvePresetsContentsForPopupWindow.GetBasePrefText(this.m_CurveLibraryType);

            this.m_GenericPresetLibraryInspector.itemViewMode = PresetLibraryEditorState.GetItemViewMode(basePrefText);
            if (this.m_GenericPresetLibraryInspector != null)
            {
                this.m_GenericPresetLibraryInspector.OnInspectorGUI();
            }
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            string editorPrefPrefix = CurvePresetsContentsForPopupWindow.GetBasePrefText(m_CurveLibraryType);

            m_GenericPresetLibraryInspector.itemViewMode = PresetLibraryEditorState.GetItemViewMode(editorPrefPrefix); // ensure in-sync
            if (m_GenericPresetLibraryInspector != null)
            {
                m_GenericPresetLibraryInspector.OnInspectorGUI();
            }
        }
 public void InitIfNeeded()
 {
     if (this.m_CurveLibraryEditorState == null)
     {
         this.m_CurveLibraryEditorState = new PresetLibraryEditorState(CurvePresetsContentsForPopupWindow.GetBasePrefText(this.m_CurveLibraryType));
         this.m_CurveLibraryEditorState.TransferEditorPrefsState(true);
     }
     if (this.m_CurveLibraryEditor != null)
     {
         return;
     }
     this.m_CurveLibraryEditor = new PresetLibraryEditor <CurvePresetLibrary>(new ScriptableObjectSaveLoadHelper <CurvePresetLibrary>(CurvePresetsContentsForPopupWindow.GetExtension(this.m_CurveLibraryType), SaveType.Text), this.m_CurveLibraryEditorState, new System.Action <int, object>(this.ItemClickedCallback));
     this.m_CurveLibraryEditor.addDefaultPresets   += new System.Action <PresetLibrary>(this.AddDefaultPresetsToLibrary);
     this.m_CurveLibraryEditor.presetsWasReordered += new System.Action(this.OnPresetsWasReordered);
     this.m_CurveLibraryEditor.previewAspect        = 4f;
     this.m_CurveLibraryEditor.minMaxPreviewHeight  = new Vector2(24f, 24f);
     this.m_CurveLibraryEditor.showHeader           = true;
 }
Ejemplo n.º 4
0
 public void InitIfNeeded()
 {
     if (this.m_CurveLibraryEditorState == null)
     {
         this.m_CurveLibraryEditorState = new PresetLibraryEditorState(CurvePresetsContentsForPopupWindow.GetBasePrefText(this.m_CurveLibraryType));
         this.m_CurveLibraryEditorState.TransferEditorPrefsState(true);
     }
     if (this.m_CurveLibraryEditor == null)
     {
         ScriptableObjectSaveLoadHelper <CurvePresetLibrary> helper = new ScriptableObjectSaveLoadHelper <CurvePresetLibrary>(CurvePresetsContentsForPopupWindow.GetExtension(this.m_CurveLibraryType), SaveType.Text);
         this.m_CurveLibraryEditor = new PresetLibraryEditor <CurvePresetLibrary>(helper, this.m_CurveLibraryEditorState, new Action <int, object>(this.ItemClickedCallback));
         PresetLibraryEditor <CurvePresetLibrary> expr_6E = this.m_CurveLibraryEditor;
         expr_6E.addDefaultPresets = (Action <PresetLibrary>)Delegate.Combine(expr_6E.addDefaultPresets, new Action <PresetLibrary>(this.AddDefaultPresetsToLibrary));
         PresetLibraryEditor <CurvePresetLibrary> expr_95 = this.m_CurveLibraryEditor;
         expr_95.presetsWasReordered                   = (Action)Delegate.Combine(expr_95.presetsWasReordered, new Action(this.OnPresetsWasReordered));
         this.m_CurveLibraryEditor.previewAspect       = 4f;
         this.m_CurveLibraryEditor.minMaxPreviewHeight = new Vector2(24f, 24f);
         this.m_CurveLibraryEditor.showHeader          = true;
     }
 }