Beispiel #1
0
        private void DrawDialog(Dialog dialog)
        {
            float originalLabelWidth = EditorGUIUtility.labelWidth;

            // Events
            bool areEventsVisible;

            using (new FoldoutScope(793215810, "Dialog Events", out areEventsVisible, false))
            {
                if (areEventsVisible)
                {
                    EditorGUILayout.PropertyField(this.onShow);
                    EditorGUILayout.PropertyField(this.onHide);
                    EditorGUILayout.PropertyField(this.onBackButtonPressed);
                }
            }

            // Properties
            bool dialogPropertiesVisible;

            using (new FoldoutScope(793215711, "Dialog Properties", out dialogPropertiesVisible, false))
            {
                if (dialogPropertiesVisible)
                {
                    // General
                    EditorGUIUtility.labelWidth = 250;

                    EditorGUILayout.PropertyField(this.showOnAwake);
                    EditorGUILayout.PropertyField(this.dontChangeStateWhileTransitioning);

                    // Back Button
                    EditorGUIUtility.labelWidth = 200;

                    EditorGUILayout.PropertyField(this.registerForBackButton);

                    if (this.registerForBackButton.boolValue)
                    {
                        EditorGUILayout.PropertyField(this.hideOnBackButtonPressed);
                    }

                    // Input Blocker
                    EditorGUIUtility.labelWidth = 180;

                    EditorGUILayout.PropertyField(this.blockInput);

                    if (this.blockInput.boolValue)
                    {
                        EditorGUILayout.PropertyField(this.tapOutsideToDismiss);
                    }

                    // Analytics
                    EditorGUIUtility.labelWidth = 150;

                    EditorGUILayout.PropertyField(this.sendAnalyticEvent);

                    if (this.sendAnalyticEvent.boolValue)
                    {
                        EditorGUILayout.PropertyField(this.storeType);
                    }
                }
            }

            EditorGUIUtility.labelWidth = originalLabelWidth;
        }
 public bool IsTopMostDialog(Dialog dialog)
 {
     return(this.dialogs.Last != null && this.dialogs.Last.Value == dialog);
 }