void btnAceptar_ButtonPressed(GUIButton button) { Properties.Settings.Default.PantallaCompleta = guiPantallaCompleta.Checked; Properties.Settings.Default.Resolucion = ((Resolucion)guiResolucion.SelectedItem).size; Properties.Settings.Default.ProfundidadBits = (int)guiBitsDeColor.SelectedItem; Properties.Settings.Default.VelocidadRotacionInicial = guiVelocidadRotacionInicial.Value; Properties.Settings.Default.VelocidadRotacionFinal = guiVelocidadRotacionFinal.Value; Properties.Settings.Default.TiempoAceleracionRotacion = guiTiempoAceleracionRotacion.Value; Properties.Settings.Default.FormaDeControl = (string)guiFormaDeControl.SelectedItem; Properties.Settings.Default.Save(); GameEngine.Instance.RecargarConfiguracion(); GUIDialog dialogoAviso = new DialogoTextoConBotones(new Size(500, 100), "Cambio de Pantalla", "Los cambios a los modos de pantalla solo cobran efecto despues de reiniciar el juego", 0, "Aceptar"); Father.AddChildWindow( dialogoAviso, new Point( (Father.Size.Width - dialogoAviso.Size.Width) / 2, (Father.Size.Height - dialogoAviso.Size.Height) / 2)); Father.Focus = dialogoAviso; Close(); }
void introduccion_Pressed(GUIButton btn) { GUI.Controls.GUIDialog guiIntroduccion = new DialogoIntroduccion(); Father.AddChildWindow( guiIntroduccion, new Point( (Father.Size.Width - guiIntroduccion.Size.Width) / 2, (Father.Size.Height - guiIntroduccion.Size.Height) / 2)); Father.Focus = guiIntroduccion; }
void ayuda_Pressed(GUIButton btn) { GUI.Controls.GUIDialog guiAyuda = new DialogoAyuda(); Father.AddChildWindow( guiAyuda, new Point( (Father.Size.Width - guiAyuda.Size.Width) / 2, (Father.Size.Height - guiAyuda.Size.Height) / 2)); Father.Focus = guiAyuda; }
void salir_Pressed(GUIButton btn) { GUI.Controls.GUIDialog guiDialogoSalir = new DialogoSalir(); Father.AddChildWindow( guiDialogoSalir, new Point( (Father.Size.Width - guiDialogoSalir.Size.Width) / 2, (Father.Size.Height - guiDialogoSalir.Size.Height) / 2)); Father.Focus = guiDialogoSalir; }
void reiniciar_Pressed(GUIButton btn) { DialogoReiniciar guiDialogoReiniciar = new DialogoReiniciar(null, false); Father.AddChildWindow( guiDialogoReiniciar, new Point( (Father.Size.Width - guiDialogoReiniciar.Size.Width) / 2, (Father.Size.Height - guiDialogoReiniciar.Size.Height) / 2)); Father.Focus = guiDialogoReiniciar; Close(); }