source: 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/MainMenuScreen.cs @ 2144

Revision 2141, 1.1 KB checked in by sijoseha, 8 years ago (diff)

Whoa. A lot of stuff since last commit.
Implemented ScreenManager? stuff to handle all the screens.
Input is handled also.
Simple tile based map system started up.
Normal menu.
Alotofsmallstuff

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace Fera_Proelia
7{
8    class MainMenuScreen : MenuScreen
9    {
10        public MainMenuScreen()
11            : base("Main Menu")
12        {
13            MenuEntry playGameEntry = new MenuEntry("Play Game");
14            MenuEntry optionsEntry = new MenuEntry("Options");
15            MenuEntry exitEntry = new MenuEntry("Exit Game");
16
17            playGameEntry.Selected += PlayGameEntrySelected;
18            optionsEntry.Selected += OptionsEntrySelected;
19            exitEntry.Selected += ExitEntrySelected;
20
21            MenuEntries.Add(playGameEntry);
22            MenuEntries.Add(optionsEntry);
23            MenuEntries.Add(exitEntry);
24        }
25
26        void PlayGameEntrySelected(object sender, EventArgs e)
27        {
28            ScreenManager.AddScreen(new GameplayScreen());
29        }
30
31        void OptionsEntrySelected(object sender, EventArgs e)
32        {
33
34        }
35
36        void ExitEntrySelected(object sender, EventArgs e)
37        {
38
39        }
40    }
41}
Note: See TracBrowser for help on using the repository browser.