public override void Render(float elapsedTime) { drawer2D.BeginDrawSprite(); drawer2D.DrawSprite(backgroundSprite); drawer2D.EndDrawSprite(); text.render(); GuiMessage msg = gui.Update(elapsedTime, Input); // proceso el msg switch (msg.message) { case MessageType.WM_COMMAND: switch (msg.id) { case IDOK: if (msg_box_app_exit) { Application.Exit(); } if (msg_box_nueva_mision) { music.closeFile(); GameModel.ChangeLevel(); } break; case IDCANCEL: gui.EndDialog(); break; case ID_NUEVA_PARTIDA: gui.MessageBox("Nueva Partida", "TGC Gui Demo"); msg_box_nueva_mision = true; msg_box_app_exit = false; break; case ID_APP_EXIT: gui.MessageBox("Desea Salir?", "TGC Gui Demo"); msg_box_app_exit = true; msg_box_nueva_mision = false; break; case ID_CONTROLES: gui.MessageBoxControles("Controles", "TGC Gui Demo"); break; } break; default: break; } gui.Render(); }