AlphaTab.Rendering.Utils.BarHelpersGroup.BuildHelpers C# (CSharp) Method

BuildHelpers() public method

public BuildHelpers ( AlphaTab.Model.Track tracks, int barIndex ) : void
tracks AlphaTab.Model.Track
barIndex int
return void
        public void BuildHelpers(Track[] tracks, int barIndex)
        {
            for (int i = 0; i < tracks.Length; i++)
            {
                var t = tracks[i];
                FastList<FastDictionary<int, BarHelpers>> h;
                if (!Helpers.ContainsKey(t.Index))
                {
                    h = new FastList<FastDictionary<int, BarHelpers>>();
                    for (int s = 0; s < t.Staves.Count; s++)
                    {
                        h.Add(new FastDictionary<int, BarHelpers>());
                    }
                    Helpers[t.Index] = h;
                }
                else
                {
                    h = Helpers[t.Index];
                }

                for (int s = 0; s < t.Staves.Count; s++)
                {
                    if (!h[s].ContainsKey(barIndex))
                    {
                        h[s][barIndex] = new BarHelpers(t.Staves[s].Bars[barIndex]);
                    }
                }
            }
        }