using System; using System.Collections.Generic; using System.Linq; using Demo.Features.Demos; using Microsoft.Xna.Framework; using MonoGame.Extended; using MonoGame.Extended.Gui; using MonoGame.Extended.Gui.Controls; using MonoGame.Extended.TextureAtlases; namespace Demo.Features.Screens { public class SelectDemoScreen : Screen { private readonly IDictionary _demos; private readonly Action _loadDemo; public SelectDemoScreen(IDictionary demos, Action loadDemo, Action exitGameAction) { _demos = demos; _loadDemo = loadDemo; var dialog = Skin.Create("dialog"); var grid = new UniformGrid { Columns = 3 }; foreach (var demo in _demos.Values.OrderBy(i => i.Name)) { var button = Skin.Create