private void Init(IMapSelection mapSelection) { blur = CreateChild <BlurDisplay>("focus-blur", 0); { blur.Anchor = AnchorType.Fill; blur.Offset = Offset.Zero; } gradientSprite = CreateChild <UguiSprite>("gradient", 1); { gradientSprite.Anchor = AnchorType.Fill; gradientSprite.RawSize = Vector2.zero; gradientEffect = gradientSprite.AddEffect(new GradientEffect()); gradientEffect.Component.direction = UIGradient.Direction.Vertical; } quitButton = CreateChild <MenuButton>("quit-button", 2); { quitButton.Anchor = AnchorType.Bottom; quitButton.Y = 100; quitButton.Size = new Vector2(160f, 160f); quitButton.LabelText = "Quit"; quitButton.IconName = "icon-power"; quitButton.OnTriggered += OnQuitButton; } backButton = CreateChild <MenuButton>("back-button", 2); { backButton.X = -160f; backButton.Size = new Vector2(160f, 160f); backButton.LabelText = "Back"; backButton.IconName = "icon-arrow-left"; backButton.OnTriggered += OnBackButton; } playButton = CreateChild <MenuButton>("play-button", 2); { playButton.Size = new Vector2(160f, 160f); playButton.LabelText = "Play"; playButton.IconName = "icon-play"; playButton.OnTriggered += OnPlayButton; } downloadButton = CreateChild <MenuButton>("download-button", 2); { downloadButton.X = 160f; downloadButton.Size = new Vector2(160f, 160f); downloadButton.LabelText = "Download"; downloadButton.IconName = "icon-download"; downloadButton.OnTriggered += OnDownloadButton; } OnEnableInited(); }
public MapManager(IMapsetStore store, NotificationBox notificationBox, IMapSelection selection) { if (store == null) { throw new ArgumentNullException(nameof(store)); } this.store = store; this.notificationBox = notificationBox; this.selection = selection; }