public MainMenuScreen(NamelessGame game) { // Panel = new Panel(new Vector2(game.GetSettings().HudWidth(), game.GetActualCharacterHeight()), PanelSkin.Default, Anchor.Center); Panel = new Panel() { HorizontalAlignment = HorizontalAlignment.Center }; var vPanel = new VerticalStackPanel(); NewGame = new ImageTextButton() { Text = "New game", Width = 200, Height = 50, ContentHorizontalAlignment = HorizontalAlignment.Center, ContentVerticalAlignment = VerticalAlignment.Center }; LoadGame = new ImageTextButton() { Text = "Load", Width = 200, Height = 50, ContentHorizontalAlignment = HorizontalAlignment.Center, ContentVerticalAlignment = VerticalAlignment.Center };; CreateTimeline = new ImageTextButton() { Text = "Create timeline", Width = 200, Height = 50, ContentHorizontalAlignment = HorizontalAlignment.Center, ContentVerticalAlignment = VerticalAlignment.Center }; Options = new ImageTextButton() { Text = "Options", Width = 200, Height = 50, ContentHorizontalAlignment = HorizontalAlignment.Center, ContentVerticalAlignment = VerticalAlignment.Center }; Exit = new ImageTextButton() { Text = "Exit", Width = 200, Height = 50, ContentHorizontalAlignment = HorizontalAlignment.Center, ContentVerticalAlignment = VerticalAlignment.Center }; NewGame.Click += (sender, args) => { SimpleActions.Add(MainMenuAction.NewGame); }; LoadGame.Click += (sender, args) => { SimpleActions.Add(MainMenuAction.LoadGame); }; CreateTimeline.Click += (sender, args) => { SimpleActions.Add(MainMenuAction.GenerateNewTimeline); }; Options.Click += (sender, args) => { SimpleActions.Add(MainMenuAction.Options); }; Exit.Click += (sender, args) => { SimpleActions.Add(MainMenuAction.Exit); }; vPanel.Widgets.Add(NewGame); vPanel.Widgets.Add(LoadGame); vPanel.Widgets.Add(CreateTimeline); vPanel.Widgets.Add(Options); vPanel.Widgets.Add(Exit); Panel.Widgets.Add(vPanel); game.Desktop.Widgets.Add(Panel); }
private void ReturnToGameOnClick(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.ReturnToGame); }
private void OnClickModeTerrain(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.TerrainMode); Mode = WorldBoardScreenAction.TerrainMode; }
private void OnClickLandmasses(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.RegionsMode); Mode = WorldBoardScreenAction.RegionsMode; }
private void OnClickPolitical(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.PoliticalMode); Mode = WorldBoardScreenAction.PoliticalMode; }
private void OnClickArtifacts(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.ArtifactMode); Mode = WorldBoardScreenAction.ArtifactMode; }
private void OnLocalMap(object sender, EventArgs e) { SimpleActions.Add(WorldBoardScreenAction.LocalMap); }