public override void OnInspectorGUI() { this.Target = (SplashScreensManager)base.target; if (this.screenList == null) { this.screenList = new plyReorderableList(this.Target.screens, typeof(SplashScreensManager.SplashScreen), true, true, true, true, false, false, false, null, null); this.screenList.elementHeight = (float)(3.0 * (EditorGUIUtility.singleLineHeight + 2.0) + 6.0); this.screenList.drawHeaderCallback = this.DrawListHeader; this.screenList.drawElementCallback = this.DrawElement; this.screenList.onAddElement = this.OnAdd; this.screenList.onRemoveElement = this.OnRemove; this.screenList.onReorder = this.OnReorder; } EditorGUILayout.Space(); this.screenList.DoLayoutList(); this.Target.autoUnloadWhenDone = (AutoUnloadOption)EditorGUILayout.EnumPopup(SplashScreensManagerInspector.GC_AutoUnload, (Enum)(object)this.Target.autoUnloadWhenDone); this.Target.minShowTime = EditorGUILayout.FloatField(SplashScreensManagerInspector.GC_MinShow, this.Target.minShowTime); EditorGUILayout.Space(); base.serializedObject.Update(); EditorGUILayout.PropertyField(this.p_onSpashScreenShown); EditorGUILayout.PropertyField(this.p_onSpashScreenHidden); EditorGUILayout.PropertyField(this.p_onSpashScreensDone); base.serializedObject.ApplyModifiedProperties(); EditorGUILayout.Space(); if (GUI.changed) { plyEdUtil.SetDirty(this.Target); GUI.changed = false; } }
protected void OnEnable() { this.manager = (SplashScreensManager)base.target; this.p_onSpashScreensDone = base.serializedObject.FindProperty("onSpashScreensDone"); for (int i = 0; i < this.manager.screens.Count; i++) { if ((UnityEngine.Object) this.manager.screens[i].watchVariable != (UnityEngine.Object)null) { this.manager.screens[i].watchVariable.OwnerCalledDeserialize(this.manager); } } }
public override void OnInspectorGUI() { base.serializedObject.Update(); this.manager = (SplashScreensManager)base.target; if (this.manager._edDeserialize) { for (int i = 0; i < this.manager.screens.Count; i++) { if ((UnityEngine.Object) this.manager.screens[i].watchVariable != (UnityEngine.Object)null && this.manager.screens[i].watchVariable._edDeserialize) { this.manager.screens[i].watchVariable.Deserialize(); } } this.manager._edDeserialize = false; base.Repaint(); } if (this.screenList == null) { this.screenList = new plyReorderableList(this.manager.screens, typeof(SplashScreensManager.SplashScreen), true, true, true, true, false, false, null, null); this.screenList.elementHeight = (float)(3.0 * (EditorGUIUtility.singleLineHeight + 2.0) + 6.0); this.screenList.drawHeaderCallback = this.DrawListHeader; this.screenList.drawElementCallback = this.DrawElement; this.screenList.onAddElement = this.OnAdd; this.screenList.onRemoveElement = this.OnRemove; this.screenList.onReorder = this.OnReorder; } EditorGUILayout.Space(); this.screenList.DoLayoutList(); if (GUI.changed) { EditorUtility.SetDirty(this.manager); GUI.changed = false; } if ((UnityEngine.Object) this.removeComponent != (UnityEngine.Object)null && Event.current.type == EventType.Repaint) { UnityEngine.Object.DestroyImmediate(this.removeComponent); this.removeComponent = null; GUIUtility.ExitGUI(); } }