/// <summary> /// Constructs a new song select scene for the given window. /// </summary> /// <param name="window">The window for the song select scene.</param> public SongSelectScene(Window window) : base(window) { foreach(MapSetMetadata mapSet in MapManager.GetMapSets()) { foreach(Map map in mapSet.GetMaps()) { Button mapBtn = new Button(map.Name); mapBtn.Align( new RelativeAlignment(mapBtn, window, true) { OffsetX = 20, OffsetY = 20 } ); Map targetMap = map; // for lambda capture mapBtn.Clicked += delegate { window.Transition(this, new PlayScene(window, targetMap)); }; addChild(mapBtn); } } }