void ReleaseDesignerOutlets() { if (_indicatorViewLeftCorner != null) { _indicatorViewLeftCorner.Dispose(); _indicatorViewLeftCorner = null; } if (kleurenBalk != null) { kleurenBalk.Dispose(); kleurenBalk = null; } if (logo != null) { logo.Dispose(); logo = null; } if (MenuFooter != null) { MenuFooter.Dispose(); MenuFooter = null; } if (MenuTable != null) { MenuTable.Dispose(); MenuTable = null; } }
private void CreateMenuFooter() { Footer = new MenuFooter(new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Back", 14, (sender, args) => { var screen = Screen as DownloadScreen; screen?.Exit(() => new MenuScreen()); }) }, new List <ButtonText>(), Colors.MainAccent) { Parent = Container, Alignment = Alignment.BotLeft }; }
public MenuFooterTestScreenView(Screen screen) : base(screen) { var footer = new MenuFooter(new List <ButtonText> { new ButtonText(FontsBitmap.GothamRegular, "Back", 16, null), }, new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Test Button 6", 10, null), new ButtonText(FontsBitmap.GothamRegular, "Test Button 7", 10, null), new ButtonText(FontsBitmap.GothamRegular, "Test Button 8", 10, null), }, Colors.MainAccent) { Parent = Container, Alignment = Alignment.MidCenter }; }
private void CreateMenuFooter() { Footer = new MenuFooter(new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Quit Game", 14, (sender, args) => { DialogManager.Show(new ConfirmCancelDialog("Are you sure you want to exit Quaver?", (o, ex) => { var game = GameBase.Game as QuaverGame; game?.Exit(); })); }), new ButtonText(FontsBitmap.GothamRegular, "Options", 14, (sender, args) => DialogManager.Show(new SettingsDialog())), new ButtonText(FontsBitmap.GothamRegular, "Chat", 14, (sender, args) => { if (OnlineManager.Status.Value != ConnectionStatus.Connected) { NotificationManager.Show(NotificationLevel.Error, "You must be logged in to use the chat!"); return; } ChatManager.ToggleChatOverlay(true); }), new ButtonText(FontsBitmap.GothamRegular, "Download Maps", 14, (sender, args) => { if (OnlineManager.Status.Value != ConnectionStatus.Connected) { NotificationManager.Show(NotificationLevel.Error, "You must be logged in to download maps!"); return; } var screen = (QuaverScreen)Screen; screen.Exit(() => new DownloadScreen()); }), }, new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Report Bugs", 14, (sender, args) => BrowserHelper.OpenURL("https://github.com/Quaver/Quaver/issues")), new ButtonText(FontsBitmap.GothamRegular, "Discord", 14, (sender, args) => BrowserHelper.OpenURL("https://discord.gg/nJa8VFr")), new ButtonText(FontsBitmap.GothamRegular, "Twitter", 14, (sender, args) => BrowserHelper.OpenURL("https://twitter.com/QuaverGame")), new ButtonText(FontsBitmap.GothamRegular, "Website", 14, (sender, args) => BrowserHelper.OpenURL("https://quavergame.com")), }, Colors.MainAccent) { Parent = Container, Alignment = Alignment.BotLeft }; }
/// <summary> /// </summary> private void CreateFooter() { Footer = new MenuFooter(new List <ButtonText> { new ButtonText(FontsBitmap.GothamRegular, "back to menu", 14, (o, e) => LobbyScreen.ExitToMenu()), new ButtonText(FontsBitmap.GothamRegular, "options menu", 14, (o, e) => DialogManager.Show(new SettingsDialog())) }, new List <ButtonText> { new ButtonText(FontsBitmap.GothamRegular, "quick match", 14, (o, e) => { }), new ButtonText(FontsBitmap.GothamRegular, "create match", 14, (o, e) => DialogManager.Show(new CreateGameDialog())), }, Colors.MainAccent) { Parent = Container, Alignment = Alignment.BotLeft }; Footer.Y = Footer.Height; Footer.MoveToY(0, Easing.OutQuint, 600); }
/// <summary> /// </summary> /// <exception cref="NotImplementedException"></exception> private void CreateMenuFooter() { var screen = (SelectScreen)Screen; var leftButtons = new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Back", 14, (sender, args) => screen.ExitToMenu()), new ButtonText(FontsBitmap.GothamRegular, "Options", 14, (sender, args) => DialogManager.Show(new SettingsDialog())), new ButtonText(FontsBitmap.GothamRegular, "Chat", 14, (sender, args) => { if (OnlineManager.Status.Value != ConnectionStatus.Connected) { NotificationManager.Show(NotificationLevel.Error, "You must be logged in to use the chat!"); return; } ChatManager.ToggleChatOverlay(true); }), new ButtonText(FontsBitmap.GothamRegular, "Download Maps", 14, (sender, args) => { if (OnlineManager.Status.Value != ConnectionStatus.Connected) { NotificationManager.Show(NotificationLevel.Error, "You must be online to download maps!"); return; } if (OnlineManager.CurrentGame != null) { NotificationManager.Show(NotificationLevel.Error, "You cannot download maps while in multiplayer!"); return; } screen.Exit(() => new DownloadScreen()); }), new ButtonText(FontsBitmap.GothamRegular, "Profile", 14, (sender, args) => BrowserHelper.OpenURL($"https://quavergame.com/profile/{ConfigManager.Username.Value}?mode={(int) ConfigManager.SelectedGameMode.Value}")), }; var rightButtons = new List <ButtonText>() { new ButtonText(FontsBitmap.GothamRegular, "Modifiers", 14, (sender, args) => DialogManager.Show(new ModifiersDialog())), new ButtonText(FontsBitmap.GothamRegular, "Export", 14, (sender, args) => { if (Math.Abs(GameBase.Game.TimeRunning - LastExportTime) < 2000) { NotificationManager.Show(NotificationLevel.Error, "Slow down! You can only export a set every 2 seconds."); return; } LastExportTime = GameBase.Game.TimeRunning; ThreadScheduler.Run(() => { NotificationManager.Show(NotificationLevel.Info, "Exporting mapset to file..."); MapManager.Selected.Value.Mapset.ExportToZip(); NotificationManager.Show(NotificationLevel.Success, "Successfully exported mapset!"); }); }), new ButtonText(FontsBitmap.GothamRegular, "Delete", 14, ((sender, args) => { if (MapManager.Selected.Value == null) { return; } screen.DeleteSelected(); })) }; if (OnlineManager.CurrentGame == null) { rightButtons.Add(new ButtonText(FontsBitmap.GothamRegular, "Edit", 14, (sender, args) => screen.ExitToEditor())); } rightButtons.Add(new ButtonText(FontsBitmap.GothamRegular, "Random", 14, (sender, args) => screen.SelectRandomMap())); Footer = new MenuFooter(leftButtons, rightButtons, Colors.MainAccent) { Parent = Container, Alignment = Alignment.BotLeft }; }