Beispiel #1
0
        public void OnGUI(Rect area)
        {
            this.area = area;
            Event     current = Event.get_current();
            EventType type    = Event.get_current().get_type();

            this.toolbarHeight = EditorStyles.get_toolbar().get_fixedHeight();
            this.UpdateTicks();
            this.labelColor = EditorStyles.get_label().get_normal().get_textColor();
            this.line.SetColor(this.labelColor);
            this.toolbarRect.Set(area.get_x(), area.get_y(), area.get_width(), this.toolbarHeight);
            GUI.Box(this.toolbarRect, GUIContent.none, EditorStyles.get_toolbar());
            GUI.BeginGroup(area);
            if (type == 7)
            {
                this.graphRect.Set(0f, this.toolbarHeight, area.get_width(), area.get_height() - this.toolbarHeight);
                SkillEditorStyles.DarkPreviewBg.Draw(this.graphRect, false, false, false, false);
                this.DrawTicks(area);
            }
            if (type == 6 && current.get_mousePosition().x > 0f)
            {
                this.Zoom(current.get_mousePosition().x, -current.get_delta().y);
                current.Use();
            }
            if (type == 3 && (current.get_button() == 2 || Keyboard.AltAction()))
            {
                this.Move(-current.get_delta().x);
                current.Use();
            }
            GUI.EndGroup();
            if (area.Contains(current.get_mousePosition()) && type == null && current.get_mousePosition().y < this.toolbarHeight && this.TimelineClicked != null)
            {
                this.TimelineClicked(this.ScreenPositionToTime(current.get_mousePosition().x - area.get_x()));
            }
        }
        private void DrawExtrapolationOptions()
        {
            EditorGUI.BeginChangeCheck();
            double doubleValue = this.m_PreExtrapolationTimeProperty.get_doubleValue();
            bool   flag        = doubleValue > 0.0;

            if (flag)
            {
                EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                EditorGUILayout.PropertyField(this.m_PreExtrapolationModeProperty, ClipInspector.Styles.PreExtrapolateLabel, new GUILayoutOption[0]);
                EditorGUI.set_showMixedValue(this.m_PreExtrapolationTimeProperty.get_hasMultipleDifferentValues());
                EditorGUILayout.DoubleField(doubleValue, EditorStyles.get_label(), new GUILayoutOption[0]);
                EditorGUILayout.EndHorizontal();
            }
            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_PostExtrapolationModeProperty, ClipInspector.Styles.PostExtrapolateLabel, new GUILayoutOption[0]);
            EditorGUI.set_showMixedValue(this.m_PostExtrapolationTimeProperty.get_hasMultipleDifferentValues());
            EditorGUILayout.DoubleField(this.m_PostExtrapolationTimeProperty.get_doubleValue(), EditorStyles.get_label(), new GUILayoutOption[0]);
            EditorGUILayout.EndHorizontal();
            if (EditorGUI.EndChangeCheck())
            {
                if (TimelineWindow.IsEditingTimelineAsset(this.m_TimelineAsset) && TimelineWindow.instance.state != null)
                {
                    TimelineWindow.instance.state.Refresh();
                }
            }
        }
Beispiel #3
0
        public override void DoGUI()
        {
            SkillEditorStyles.Init();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            SkillEditorGUILayout.PlaymakerHeader(this);
            GUI.Label(this.versionLabelRect, VersionInfo.PlayMakerVersionLabel, SkillEditorStyles.RightAlignedLabel);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.Space(20f);
            GUILayout.FlexibleSpace();
            switch (this.pageNumber)
            {
            case 0:
                WelcomeWindow.Link(SkillEditorStyles.SamplesIcon, Strings.get_WelcomeWindow_Samples(), Strings.get_WelcomeWindow_Samples_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/samples.php");
                WelcomeWindow.Link(SkillEditorStyles.VideoIcon, Strings.get_WelcomeWindow_Tutorials(), Strings.get_WelcomeWindow_Tutorials_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://www.hutonggames.com/tutorials.html");
                WelcomeWindow.Link(SkillEditorStyles.DocsIcon, Strings.get_WelcomeWindow_Docs(), Strings.get_WelcomeWindow_Docs_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W1");
                WelcomeWindow.Link(SkillEditorStyles.ForumIcon, Strings.get_WelcomeWindow_Forums(), Strings.get_WelcomeWindow_Forums_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "http://hutonggames.com/playmakerforum/index.php");
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, Strings.get_WelcomeWindow_Addons(), Strings.get_WelcomeWindow_Addons_More(), new WelcomeWindow.LinkFunction(this.GotoPage), 1);
                break;

            case 1:
                WelcomeWindow.Link(SkillEditorStyles.BlackBerryAddonIcon, "BlackBerry Add-On", "NEW! Develop for the new BlackBerry10 platform.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10530");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Phone 8 Add-On", "NEW! Develop for Windows Phone 8 devices.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "10602");
                WelcomeWindow.Link(SkillEditorStyles.MetroAddonIcon, "Windows Store Apps Add-On", "Coming Soon: Develop Windows 8 Store Apps.", new WelcomeWindow.LinkFunction(this.OpenInAssetStore), "http://www.hutonggames.com/store.html");
                if (WelcomeWindow.setupPhoton)
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.LaunchPhotonSetupWizard), null);
                }
                else
                {
                    WelcomeWindow.Link(SkillEditorStyles.PhotonIcon, Strings.get_WelcomeWindow_Photon_Cloud(), Strings.get_WelcomeWindow_Photon_Cloud_More(), new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W928");
                }
                WelcomeWindow.Link(SkillEditorStyles.AddonsIcon, "Browse Add-Ons Online", "Find action packs and add-ons for NGUI, 2D Toolkit, Mecanim, Pathfinding, Smooth Moves, Ultimate FPS...", new WelcomeWindow.LinkFunction(this.OpenUrl), "https://hutonggames.fogbugz.com/default.asp?W714");
                break;
            }
            GUILayout.FlexibleSpace();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (this.pageNumber > 0)
            {
                GUILayout.Space(10f);
                if (GUILayout.Button("Back to Welcome Screen", EditorStyles.get_label(), new GUILayoutOption[0]))
                {
                    this.GotoPage(0);
                    GUIUtility.ExitGUI();
                    return;
                }
                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
            }
            GUILayout.FlexibleSpace();
            bool flag = GUILayout.Toggle(this.showAtStartup, Strings.get_WelcomeWindow_Show_at_Startup(), new GUILayoutOption[0]);

            if (flag != this.showAtStartup)
            {
                this.showAtStartup = flag;
                EditorPrefs.SetBool(EditorPrefStrings.get_ShowWelcomeScreen(), this.showAtStartup);
            }
            GUILayout.Space(10f);
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
            GUILayout.EndVertical();
        }
 public static bool ToolbarSettingsButton()
 {
     return(GUILayout.Button(SkillEditorContent.SettingsButton, EditorStyles.get_label(), new GUILayoutOption[]
     {
         GUILayout.MaxWidth(24f)
     }));
 }
Beispiel #5
0
 public EditableLabel(EditorWindow window, string text = "") : base(window)
 {
     base.Style             = EditorStyles.get_label();
     this.Text              = text;
     this.editableTextField = new TextField(window, GUIContent.none, text);
     this.editableTextField.EditCommited = new TextField.EditCommitedCallback(this.CommitEdit);
     this.editableTextField.FocusLost    = new TextField.LostFocusCallback(this.CommitEdit);
     this.editableTextField.ControlName  = "Category";
     EditorApplication.update            = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
 }
Beispiel #6
0
        private static void OnDrawHeader(Rect rect)
        {
            int   num  = 4;
            float num2 = rect.get_width() / (float)num;

            rect.set_width(num2);
            GUI.Label(rect, GroupTrackInspector.Styles.GroupSubTrackHeaderName, EditorStyles.get_label());
            rect.set_x(rect.get_x() + num2);
            GUI.Label(rect, GroupTrackInspector.Styles.GroupSubTrackHeaderType, EditorStyles.get_label());
            rect.set_x(rect.get_x() + num2);
            GUI.Label(rect, GroupTrackInspector.Styles.GroupSubTrackHeaderDuration, EditorStyles.get_label());
            rect.set_x(rect.get_x() + num2);
            GUI.Label(rect, GroupTrackInspector.Styles.GroupSubTrackHeaderFrames, EditorStyles.get_label());
        }
        public static bool TextFieldButtonWithHint(string text, string hint, params GUILayoutOption[] layoutOptions)
        {
            Color contentColor = GUI.get_contentColor();

            if (string.IsNullOrEmpty(text))
            {
                text = hint;
                Color textColor = EditorStyles.get_label().get_normal().get_textColor();
                textColor.a = 0.5f;
                GUI.set_contentColor(textColor);
            }
            bool result = GUILayout.Button(text, EditorStyles.get_textField(), layoutOptions);

            GUI.set_contentColor(contentColor);
            return(result);
        }
Beispiel #8
0
        private void OnDrawSubTrack(Rect rect, int index, bool selected, bool focused)
        {
            TrackAsset trackAsset = this.m_SubTracks.get_list()[index] as TrackAsset;

            if (!(trackAsset == null))
            {
                int   num  = 4;
                float num2 = rect.get_width() / (float)num;
                rect.set_width(num2);
                GUI.Label(rect, trackAsset.get_name(), EditorStyles.get_label());
                rect.set_x(rect.get_x() + num2);
                GUI.Label(rect, trackAsset.GetType().Name, EditorStyles.get_label());
                rect.set_x(rect.get_x() + num2);
                GUI.Label(rect, trackAsset.get_duration().ToString(), EditorStyles.get_label());
                rect.set_x(rect.get_x() + num2);
                double num3 = TimeUtility.ToExactFrames(trackAsset.get_duration(), (double)TimelineWindow.instance.state.frameRate);
                GUI.Label(rect, num3.ToString(), EditorStyles.get_label());
            }
        }
        public static string TextFieldWithHint(string text, string hint, params GUILayoutOption[] layoutOptions)
        {
            bool   changed      = GUI.get_changed();
            Color  contentColor = GUI.get_contentColor();
            string text2        = text;

            if (string.IsNullOrEmpty(text2))
            {
                text2 = hint;
                Color textColor = EditorStyles.get_label().get_normal().get_textColor();
                textColor.a = 0.5f;
                GUI.set_contentColor(textColor);
            }
            GUI.set_changed(false);
            text2 = EditorGUILayout.TextField(text2, layoutOptions);
            GUI.set_contentColor(contentColor);
            if (GUI.get_changed())
            {
                return(text2);
            }
            GUI.set_changed(changed);
            return(text);
        }
Beispiel #10
0
        public static double TimeField(GUIContent label, double time, bool readOnly, bool showMixed, double frameRate, double minValue, double maxValue)
        {
            Rect rect = EditorGUILayout.GetControlRect(new GUILayoutOption[0]);

            rect = EditorGUI.PrefixLabel(rect, label);
            int   indentLevel = EditorGUI.get_indentLevel();
            float labelWidth  = EditorGUIUtility.get_labelWidth();

            EditorGUI.set_indentLevel(0);
            EditorGUIUtility.set_labelWidth(13f);
            bool showMixedValue = EditorGUI.get_showMixedValue();

            EditorGUI.set_showMixedValue(showMixed);
            Rect rect2 = new Rect(rect.get_xMin(), rect.get_yMin(), rect.get_width() / 2f - 2f, rect.get_height());
            Rect rect3 = new Rect(rect.get_xMin() + rect.get_width() / 2f, rect.get_yMin(), rect.get_width() / 2f, rect.get_height());

            if (readOnly)
            {
                EditorGUI.FloatField(rect2, TimelineInspectorUtility.Styles.SecondsPrefix, (float)time, EditorStyles.get_label());
            }
            else
            {
                time = EditorGUI.DoubleField(rect2, TimelineInspectorUtility.Styles.SecondsPrefix, time);
            }
            if (frameRate > TimeUtility.kTimeEpsilon)
            {
                int    num  = TimeUtility.ToFrames(time, frameRate);
                double num2 = TimeUtility.ToExactFrames(time, frameRate);
                bool   flag = TimeUtility.OnFrameBoundary(time, frameRate);
                if (readOnly)
                {
                    if (flag)
                    {
                        EditorGUI.IntField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num, EditorStyles.get_label());
                    }
                    else
                    {
                        EditorGUI.FloatField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, (float)num2, EditorStyles.get_label());
                    }
                }
                else
                {
                    EditorGUI.BeginChangeCheck();
                    double num3;
                    if (flag)
                    {
                        int frames = EditorGUI.IntField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num);
                        num3 = Math.Max(0.0, TimeUtility.FromFrames(frames, frameRate));
                    }
                    else
                    {
                        double d = EditorGUI.DoubleField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num2);
                        num3 = Math.Max(0.0, TimeUtility.FromFrames((int)Math.Floor(d), frameRate));
                    }
                    if (EditorGUI.EndChangeCheck())
                    {
                        time = num3;
                    }
                }
            }
            EditorGUI.set_showMixedValue(showMixedValue);
            EditorGUI.set_indentLevel(indentLevel);
            EditorGUIUtility.set_labelWidth(labelWidth);
            return(Math.Min(maxValue, Math.Max(minValue, time)));
        }
Beispiel #11
0
        public static void TimeField(Rect rect, SerializedProperty property, GUIContent label, bool readOnly, double frameRate, double minValue, double maxValue)
        {
            GUIContent gUIContent = EditorGUI.BeginProperty(rect, label, property);

            rect = EditorGUI.PrefixLabel(rect, gUIContent);
            int   indentLevel = EditorGUI.get_indentLevel();
            float labelWidth  = EditorGUIUtility.get_labelWidth();

            EditorGUI.set_indentLevel(0);
            EditorGUIUtility.set_labelWidth(13f);
            EditorGUI.set_showMixedValue(property.get_hasMultipleDifferentValues());
            Rect rect2 = new Rect(rect.get_xMin(), rect.get_yMin(), rect.get_width() / 2f - 2f, rect.get_height());
            Rect rect3 = new Rect(rect.get_xMin() + rect.get_width() / 2f, rect.get_yMin(), rect.get_width() / 2f, rect.get_height());

            if (readOnly)
            {
                EditorGUI.FloatField(rect2, TimelineInspectorUtility.Styles.SecondsPrefix, (float)property.get_doubleValue(), EditorStyles.get_label());
            }
            else
            {
                EditorGUI.BeginChangeCheck();
                EditorGUI.PropertyField(rect2, property, TimelineInspectorUtility.Styles.SecondsPrefix);
                if (EditorGUI.EndChangeCheck())
                {
                    property.set_doubleValue(Math.Min(maxValue, Math.Max(minValue, property.get_doubleValue())));
                }
            }
            if (frameRate > TimeUtility.kTimeEpsilon)
            {
                EditorGUI.set_showMixedValue(property.get_hasMultipleDifferentValues());
                EditorGUI.BeginChangeCheck();
                double num  = property.get_doubleValue();
                int    num2 = TimeUtility.ToFrames(num, frameRate);
                double num3 = TimeUtility.ToExactFrames(num, frameRate);
                bool   flag = TimeUtility.OnFrameBoundary(num, frameRate);
                if (readOnly)
                {
                    if (flag)
                    {
                        EditorGUI.IntField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num2, EditorStyles.get_label());
                    }
                    else
                    {
                        EditorGUI.DoubleField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num3, EditorStyles.get_label());
                    }
                }
                else if (flag)
                {
                    int frames = EditorGUI.IntField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num2);
                    num = Math.Max(0.0, TimeUtility.FromFrames(frames, frameRate));
                }
                else
                {
                    double d = EditorGUI.DoubleField(rect3, TimelineInspectorUtility.Styles.FramesPrefix, num3);
                    num = Math.Max(0.0, TimeUtility.FromFrames((int)Math.Floor(d), frameRate));
                }
                if (EditorGUI.EndChangeCheck())
                {
                    property.set_doubleValue(Math.Min(maxValue, Math.Max(-maxValue, num)));
                }
            }
            EditorGUI.set_indentLevel(indentLevel);
            EditorGUIUtility.set_labelWidth(labelWidth);
            EditorGUI.EndProperty();
        }
Beispiel #12
0
 private void DoSortedByFSM()
 {
     this.currentFSM    = null;
     this.currentState  = null;
     this.currentAction = null;
     using (List <ActionReport> .Enumerator enumerator = ActionReport.ActionReportList.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ActionReport current = enumerator.get_Current();
             if (!(current.fsm == null) && current.state != null && current.action != null)
             {
                 if (current.fsm != this.currentFSM)
                 {
                     this.currentFSM = current.fsm;
                     SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
                     if (GUILayout.Button(Labels.GetFullFsmLabel(current.fsm.get_Fsm()), EditorStyles.get_label(), new GUILayoutOption[0]))
                     {
                         ActionReportWindow.SelectReport(current);
                         break;
                     }
                     EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                 }
                 if (current.state != this.currentState)
                 {
                     this.currentState = current.state;
                     SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                     if (GUILayout.Button(Strings.get_Tab() + current.state.get_Name(), EditorStyles.get_label(), new GUILayoutOption[0]))
                     {
                         ActionReportWindow.SelectReport(current);
                         break;
                     }
                     EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                 }
                 if (current.action != this.currentAction)
                 {
                     SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                     this.currentAction = current.action;
                     if (GUILayout.Button(Strings.get_Tab2() + Labels.GetActionLabel(current.action), EditorStyles.get_label(), new GUILayoutOption[0]))
                     {
                         ActionReportWindow.SelectReport(current);
                         break;
                     }
                     EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                 }
                 ActionReportWindow.DoReportLine(Strings.get_Tab3(), current);
             }
         }
     }
 }
Beispiel #13
0
        private void DoSortedByAction()
        {
            List <Type> list = new List <Type>();

            using (List <ActionReport> .Enumerator enumerator = ActionReport.ActionReportList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ActionReport current = enumerator.get_Current();
                    Type         type    = current.action.GetType();
                    if (!list.Contains(type))
                    {
                        list.Add(type);
                    }
                }
            }
            this.currentAction = null;
            using (List <Type> .Enumerator enumerator2 = list.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    Type current2 = enumerator2.get_Current();
                    SkillEditorGUILayout.Divider(new GUILayoutOption[0]);
                    GUILayout.Label(Labels.GetActionLabel(current2), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    this.currentFSM   = null;
                    this.currentState = null;
                    List <SkillState>   list2 = new List <SkillState>();
                    List <ActionReport> list3 = new List <ActionReport>();
                    List <string>       list4 = new List <string>();
                    SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                    GUILayout.Label(Strings.get_ActionReportWindow_Action_Changes_Title(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    using (List <ActionReport> .Enumerator enumerator3 = ActionReport.ActionReportList.GetEnumerator())
                    {
                        while (enumerator3.MoveNext())
                        {
                            ActionReport current3 = enumerator3.get_Current();
                            Type         type2    = current3.action.GetType();
                            if (type2 == current2)
                            {
                                if (!list2.Contains(current3.state))
                                {
                                    list3.Add(current3);
                                    list2.Add(current3.state);
                                }
                                if (!list4.Contains(current3.logText))
                                {
                                    ActionReportWindow.DoReportLine(Strings.get_Tab(), current3);
                                    list4.Add(current3.logText);
                                }
                            }
                        }
                    }
                    SkillEditorGUILayout.LightDivider(new GUILayoutOption[0]);
                    GUILayout.Label(Strings.get_ActionReportWindow_Effected_States_Title(), EditorStyles.get_boldLabel(), new GUILayoutOption[0]);
                    using (List <ActionReport> .Enumerator enumerator4 = list3.GetEnumerator())
                    {
                        while (enumerator4.MoveNext())
                        {
                            ActionReport current4 = enumerator4.get_Current();
                            if (current4.state != null && !(current4.fsm == null))
                            {
                                if (GUILayout.Button(Strings.get_Tab() + Labels.GetFullStateLabel(current4.state), EditorStyles.get_label(), new GUILayoutOption[0]))
                                {
                                    ActionReportWindow.SelectReport(current4);
                                    return;
                                }
                                EditorGUIUtility.AddCursorRect(GUILayoutUtility.GetLastRect(), 4);
                            }
                        }
                    }
                }
            }
        }
Beispiel #14
0
        private static void DoPlaybackControls()
        {
            Color contentColor = GUI.get_contentColor();

            GUI.set_contentColor((!SkillEditorStyles.UsingProSkin()) ? Color.get_black() : EditorStyles.get_label().get_normal().get_textColor());
            EditorGUI.BeginChangeCheck();
            bool isPlaying = GUILayout.Toggle(EditorApplication.get_isPlayingOrWillChangePlaymode(), SkillEditorContent.Play, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            });

            if (EditorGUI.EndChangeCheck())
            {
                EditorApplication.set_isPlaying(isPlaying);
            }
            EditorGUI.BeginChangeCheck();
            bool isPaused = GUILayout.Toggle(EditorApplication.get_isPaused(), SkillEditorContent.Pause, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            });

            if (EditorGUI.EndChangeCheck())
            {
                EditorApplication.set_isPaused(isPaused);
            }
            if (GUILayout.Button(SkillEditorContent.Step, EditorStyles.get_toolbarButton(), new GUILayoutOption[]
            {
                GUILayout.MaxWidth(40f)
            }))
            {
                FsmDebugger.Instance.Step();
                GUIUtility.ExitGUI();
            }
            GUI.set_contentColor(contentColor);
        }
Beispiel #15
0
        public static void MatchTargetsField(SerializedProperty property, SerializedProperty alternate, SerializedProperty disableOptions, bool showHelp = false)
        {
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            property.set_isExpanded(EditorGUILayout.Foldout(property.get_isExpanded(), AnimationTrackInspector.Styles.MatchTargetFieldsTitle));
            GUILayout.EndHorizontal();
            int num = 0;

            if (property.get_isExpanded())
            {
                if (showHelp)
                {
                    string text = string.Format(AnimationTrackInspector.Styles.MatchTargetsFieldHelp.get_text(), AnimationTrackInspector.Styles.DisableOptionsTitle.get_text());
                    EditorGUILayout.HelpBox(text, 1);
                }
                EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() + 1);
                bool flag = false;
                if (alternate != null)
                {
                    EditorGUILayout.PropertyField(disableOptions, AnimationTrackInspector.Styles.DisableOptionsTitle, new GUILayoutOption[0]);
                    flag = !disableOptions.get_boolValue();
                    if (flag)
                    {
                        property = alternate;
                    }
                }
                using (new EditorGUI.DisabledScope(flag))
                {
                    MatchTargetFields intValue = (MatchTargetFields)property.get_intValue();
                    EditorGUI.BeginChangeCheck();
                    Rect controlRect = EditorGUILayout.GetControlRect(false, 32f, new GUILayoutOption[0]);
                    Rect rect        = new Rect(controlRect.get_x(), controlRect.get_y(), controlRect.get_width(), 16f);
                    EditorGUI.BeginProperty(controlRect, AnimationTrackInspector.Styles.MatchTargetFieldsTitle, property);
                    float num2 = 0f;
                    float num3 = 0f;
                    EditorStyles.get_label().CalcMinMaxWidth(AnimationTrackInspector.Styles.XTitle, ref num2, ref num3);
                    float num4 = num2 + 20f;
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    Rect rect2       = EditorGUI.PrefixLabel(rect, AnimationTrackInspector.Styles.PositionTitle);
                    int  indentLevel = EditorGUI.get_indentLevel();
                    EditorGUI.set_indentLevel(0);
                    rect2.set_width(num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.XTitle, intValue.HasAny(MatchTargetFields.PositionX))) ? 0 : 1);
                    rect2.set_x(rect2.get_x() + num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.YTitle, intValue.HasAny(MatchTargetFields.PositionY))) ? 0 : 2);
                    rect2.set_x(rect2.get_x() + num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.ZTitle, intValue.HasAny(MatchTargetFields.PositionZ))) ? 0 : 4);
                    EditorGUI.set_indentLevel(indentLevel);
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    rect.set_y(rect.get_y() + 16f);
                    rect2 = EditorGUI.PrefixLabel(rect, AnimationTrackInspector.Styles.RotationTitle);
                    EditorGUI.set_indentLevel(0);
                    rect2.set_width(num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.XTitle, intValue.HasAny(MatchTargetFields.RotationX))) ? 0 : 8);
                    rect2.set_x(rect2.get_x() + num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.YTitle, intValue.HasAny(MatchTargetFields.RotationY))) ? 0 : 16);
                    rect2.set_x(rect2.get_x() + num4);
                    num |= ((!EditorGUI.ToggleLeft(rect2, AnimationTrackInspector.Styles.ZTitle, intValue.HasAny(MatchTargetFields.RotationZ))) ? 0 : 32);
                    EditorGUI.set_indentLevel(indentLevel);
                    GUILayout.EndHorizontal();
                    if (EditorGUI.EndChangeCheck())
                    {
                        property.set_intValue(num);
                    }
                    EditorGUI.EndProperty();
                }
                EditorGUI.set_indentLevel(EditorGUI.get_indentLevel() - 1);
            }
        }