public ActionResult EditMenuMain(MenuMain post)
 {
     try
     {
         Init("cabinet_menu");
         if (id == "")
         {
             return(RedirectToAction("MenuMain", "Cabinet"));
         }
         MenuMain menumain = new MenuMain(this.shared);
         if (id == "Add")
         {
             menumain.SetDefaults();
             menumain.Copy(post);
             menumain.Insert();
         }
         else
         {
             menumain.Select(id);
             if (shared.error.AnyError())
             {
                 return(RedirectToAction("MenuMain", "Cabinet"));
             }
             menumain.Copy(post);
             menumain.Update();
         }
         return(RedirectToAction("MenuMain", "Cabinet"));
     }
     catch (Exception ex)
     {
         return(ShowError(ex));
     }
 }
Beispiel #2
0
 // UPDATE & DRAW
 public void Update(GameTime gameTime)
 {
     if (reset)
     {
         mainMenu = new MenuMain();
         gameMenu = new MenuGame();
         reset    = false;
     }
     if (activeMenu == "main")
     {
         mainMenu.Update(gameTime);
     }
     else if (activeMenu == "game")
     {
         gameMenu.Update(gameTime);
     }
 }
Beispiel #3
0
        protected override void Update(GameTime gameTime)
        {
            if (Keyboard.GetState().IsKeyDown(Keys.F5))
            {
                graphics.ToggleFullScreen();
            }

            if (menuStatus)
            {
                _menu.Update(gameTime);
            }
            else if (levelStatus)
            {
                _level.Update(gameTime);
            }

            base.Update(gameTime);
        }