Beispiel #1
0
        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);
        }
Beispiel #2
0
 private void ReturnToGameOnClick(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.ReturnToGame);
 }
Beispiel #3
0
 private void OnClickModeTerrain(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.TerrainMode);
     Mode = WorldBoardScreenAction.TerrainMode;
 }
Beispiel #4
0
 private void OnClickLandmasses(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.RegionsMode);
     Mode = WorldBoardScreenAction.RegionsMode;
 }
Beispiel #5
0
 private void OnClickPolitical(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.PoliticalMode);
     Mode = WorldBoardScreenAction.PoliticalMode;
 }
Beispiel #6
0
 private void OnClickArtifacts(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.ArtifactMode);
     Mode = WorldBoardScreenAction.ArtifactMode;
 }
Beispiel #7
0
 private void OnLocalMap(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.LocalMap);
 }