Exemplo n.º 1
0
        public void Destroy()
        {
            this.ItemOver = MenuItens.NONE;
            this.World.Clear();

            this.LevelReady = false;
        }
        public MenuItens CreateMainMenu(string menuName = null)
        {
            //nedd to impleimprovement this feature, to check the menus itens allowed to user
            var result = new MenuItens();

            return(result);
        }
Exemplo n.º 3
0
        public void CreateMenu()
        {
            //this.DestroyMenu();
            this.ItemOver = MenuItens.NONE;

            string lang = this.Storage.getItemsString("Language")[0];

            this.MenuItemsString[0] = this.Localization.Get(lang, "UI_MAIN_MENU_PLAY").ToUpper();
            this.MenuItemsString[1] = this.Localization.Get(lang, "UI_MAIN_MENU_SETTINGS").ToUpper();
            this.MenuItemsString[2] = this.Localization.Get(lang, "UI_MAIN_MENU_CREDITS").ToUpper();
            this.MenuItemsString[3] = this.Localization.Get(lang, "UI_MAIN_MENU_QUIT").ToUpper();

            this.Hud.ReloadShow = false;
            this.Hud.HomeShow   = false;
            this.Hud.BackShow   = false;
            this.Hud.ResizeShow = true;
            this.Hud.Start(this.Content, this.Mouse, this.Screem);

            this.TitleMainMenu          = new Title();
            this.TitleMainMenu.FontBold = this.FontBold;
            this.TitleMainMenu.Screem   = this.Screem;
            this.TitleMainMenu.Start();
            this.TitleMainMenu.Show = true;
            this.UI.Add(this.TitleMainMenu);

            for (int i = 0; i < 4; i++)
            {
                MenuItem MenuItem = new MenuItem();
                MenuItem.Value    = MenuItemsString[i];
                MenuItem.Content  = this.Content;
                MenuItem.Font     = this.Font;
                MenuItem._Mouse   = this.Mouse;
                MenuItem.Position = new Vector2(this.Screem.getCenterScreem.X, this.Screem.getCenterScreem.Y + (50 * i));
                MenuItem.World    = this.World;
                MenuItem.Id       = i;
                MenuItem.Start();
                MenuItem.MainMenu = this;
                MenuItem.Show     = true;
                MenuItems.Add(MenuItem);
                this.UI.Add(MenuItem);
            }
        }