private void updateTrackGroups(Rect area, Rect controlArea) { float num = area.y; SortedDictionary <int, TrackGroupWrapper> sortedDictionary = new SortedDictionary <int, TrackGroupWrapper>(); foreach (TrackGroupWrapper current in trackGroupBinding.Keys) { trackGroupBinding[current].TrackGroup = current; sortedDictionary.Add(current.Ordinal, current); } foreach (int current2 in sortedDictionary.Keys) { TrackGroupWrapper trackGroupWrapper = sortedDictionary[current2]; TrackGroupControl trackGroupControl = trackGroupBinding[trackGroupWrapper]; trackGroupControl.Ordinal = new [] { current2 }; float height = trackGroupControl.GetHeight(); Rect position = new Rect(area.x, num, area.width, height); Rect fullHeader = new Rect(area.x, num, track_header_area_width + sidebarControlArea.width, height); Rect safeHeader = new Rect(area.x, num, track_header_area_width - 32f, height); Rect rect = new Rect(safeHeader.x + safeHeader.width, num, 16f, 16f); Rect arg_1FB_0 = new Rect(rect.x + 16f, num, 16f, 16f); Rect content = new Rect(fullHeader.x + fullHeader.width, num, area.width - fullHeader.width, height); trackGroupControl.Update(trackGroupWrapper, directorState, position, fullHeader, safeHeader, content, controlArea); GUI.enabled = (current2 > 0); if (GUI.Button(rect, string.Empty, DirectorControlStyles.UpArrowIcon)) { TrackGroupWrapper expr_1A4 = trackGroupWrapper; int ordinal = expr_1A4.Ordinal; expr_1A4.Ordinal = ordinal - 1; TrackGroupWrapper expr_1CF = trackGroupBinding[sortedDictionary[current2 - 1]].TrackGroup; ordinal = expr_1CF.Ordinal; expr_1CF.Ordinal = ordinal + 1; } GUI.enabled = (current2 < sortedDictionary.Count - 1); if (GUI.Button(arg_1FB_0, string.Empty, DirectorControlStyles.DownArrowIcon)) { TrackGroupWrapper expr_204 = trackGroupWrapper; int ordinal = expr_204.Ordinal; expr_204.Ordinal = ordinal + 1; TrackGroupWrapper expr_22F = trackGroupBinding[sortedDictionary[current2 + 1]].TrackGroup; ordinal = expr_22F.Ordinal; expr_22F.Ordinal = ordinal - 1; } GUI.enabled = true; num += height; } var rollRect = new Rect(area.x, area.y, track_header_area_width, area.height); switch (Event.current.type) { case EventType.ScrollWheel: break; } }
private void updateTrackGroups(Rect area) { float num = area.y; SortedDictionary <int, TrackGroupWrapper> dictionary = new SortedDictionary <int, TrackGroupWrapper>(); foreach (TrackGroupWrapper wrapper in this.trackGroupBinding.Keys) { this.trackGroupBinding[wrapper].TrackGroup = wrapper; dictionary.Add(wrapper.Ordinal, wrapper); } foreach (int num2 in dictionary.Keys) { TrackGroupWrapper trackGroup = dictionary[num2]; TrackGroupControl control = this.trackGroupBinding[trackGroup]; control.Ordinal = new int[] { num2 }; float height = control.GetHeight(); Rect position = new Rect(area.x, num, area.width, height); Rect fullHeader = new Rect(area.x, num, this.track_header_area_width + this.sidebarControlArea.width, height); Rect safeHeader = new Rect(area.x, num, this.track_header_area_width - 32f, height); float introduced16 = safeHeader.x; Rect rect4 = new Rect(introduced16 + safeHeader.width, num, 16f, 16f); float introduced17 = fullHeader.x; Rect content = new Rect(introduced17 + fullHeader.width, num, area.width - fullHeader.width, height); control.Update(trackGroup, this.directorState, position, fullHeader, safeHeader, content); GUI.enabled = (num2 > 0); if (GUI.Button(rect4, string.Empty, DirectorControlStyles.UpArrowIcon)) { trackGroup.Ordinal--; TrackGroupWrapper wrapper1 = this.trackGroupBinding[dictionary[num2 - 1]].TrackGroup; wrapper1.Ordinal++; } GUI.enabled = (num2 < (dictionary.Count - 1)); if (GUI.Button(new Rect(rect4.x + 16f, num, 16f, 16f), string.Empty, DirectorControlStyles.DownArrowIcon)) { trackGroup.Ordinal++; TrackGroupWrapper wrapper3 = this.trackGroupBinding[dictionary[num2 + 1]].TrackGroup; wrapper3.Ordinal--; } GUI.enabled = (true); num += height; } }