Example #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);
        }
Example #2
0
 // Use this for initialization
 void Awake()
 {
     simpleActions = GetComponent <SimpleActions> ();
     mvtActions    = GetComponent <MovementActions> ();
 }
Example #3
0
 private void ReturnToGameOnClick(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.ReturnToGame);
 }
Example #4
0
 private void OnClickModeTerrain(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.TerrainMode);
     Mode = WorldBoardScreenAction.TerrainMode;
 }
Example #5
0
 private void OnClickLandmasses(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.RegionsMode);
     Mode = WorldBoardScreenAction.RegionsMode;
 }
Example #6
0
 private void OnClickPolitical(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.PoliticalMode);
     Mode = WorldBoardScreenAction.PoliticalMode;
 }
Example #7
0
 private void OnClickArtifacts(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.ArtifactMode);
     Mode = WorldBoardScreenAction.ArtifactMode;
 }
Example #8
0
 private void OnLocalMap(object sender, EventArgs e)
 {
     SimpleActions.Add(WorldBoardScreenAction.LocalMap);
 }