internal BeatmapTreeItem(Beatmap beatmap = null, BeatmapTreeItem parent = null, PlayModes?playModeOverride = null)
        {
            Parent = parent;

            if (playModeOverride.HasValue)
            {
                modeOverride = playModeOverride;
            }

            UnselectedColour = orange;

            Beatmap = beatmap;

            if (beatmap != null)
            {
                //Don't show pink coloured new maps.
                if (!beatmap.BeatmapPresent)
                {
                    UnselectedColour = newmap;
                }

                hasPlayed = !beatmap.NewFile;
            }

            BackgroundColour = UnselectedColour;
        }
 internal BeatmapTreeItem(Beatmap beatmap, int level, BeatmapTreeItem parent)
 {
     Parent  = parent;
     Beatmap = beatmap;
     Level   = level;
     PopulateSprites();
     Children = new List <BeatmapTreeItem>();
 }
Exemple #3
0
        internal List <BeatmapTreeItem> MakeMenuItems(BeatmapTreeItem parent)
        {
            List <BeatmapTreeItem> items = new List <BeatmapTreeItem>();

            foreach (BeatmapTreeLevel t in Children)
            {
                items.Add(new BeatmapTreeItem(t, Level));
                items.AddRange(t.MakeMenuItems(parent));
            }
            foreach (Beatmap b in Beatmaps)
            {
                items.Add(new BeatmapTreeItem(b, Level, parent));
            }

            return(items);
        }