forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudioProfilerBackend.cs
More file actions
34 lines (34 loc) · 1007 Bytes
/
Copy pathAudioProfilerBackend.cs
File metadata and controls
34 lines (34 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
namespace UnityEditorInternal
{
internal class AudioProfilerBackend
{
public delegate void DataUpdateDelegate();
public AudioProfilerBackend.DataUpdateDelegate OnUpdate;
public AudioProfilerTreeViewState m_TreeViewState;
public List<AudioProfilerInfoWrapper> items
{
get;
private set;
}
public AudioProfilerBackend(AudioProfilerTreeViewState state)
{
this.m_TreeViewState = state;
this.items = new List<AudioProfilerInfoWrapper>();
}
public void SetData(List<AudioProfilerInfoWrapper> data)
{
this.items = data;
this.UpdateSorting();
}
public void UpdateSorting()
{
this.items.Sort(new AudioProfilerInfoHelper.AudioProfilerInfoComparer((AudioProfilerInfoHelper.ColumnIndices)this.m_TreeViewState.selectedColumn, (AudioProfilerInfoHelper.ColumnIndices)this.m_TreeViewState.prevSelectedColumn, this.m_TreeViewState.sortByDescendingOrder));
if (this.OnUpdate != null)
{
this.OnUpdate();
}
}
}
}