void apply_onClicked(object sender, InputEngine.MouseArgs e) { Settings.ChangeResolution(); resChangeMb = YesNoMessageBox.Show("Do you want to keep this resolution?\r\nChanges will be reverted in 15 second(s)"); resChangeMb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); TicksSinceResChange = 0; }
protected virtual void saveClick(object sender, InputEngine.MouseArgs e) { Sound.SoundPlayer.PlayButtonClick(); if (tb.Text == "") { return; } try { if (saves.SelectedIndex != -1) { mb = YesNoMessageBox.Show("Are you sure you want to\r\nreplace existing file: \r\n" + saves.GetSelected() + "?"); mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mbReplace_onButtonClicked); } else { Save(); GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null); //GUIEngine.curScene = null; } } catch { var a = OKMessageBox.Show("Wrong filename!"); a.onButtonClicked += new OKMessageBox.ButtonClickedEventHandler(a_onButtonClicked); } }
public void resClick(object sender, InputEngine.MouseArgs e) { Sound.SoundPlayer.PlayButtonClick(); YesNoMessageBox mb = YesNoMessageBox.Show("All statistics will be lost.\r\nContinue?"); mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); }
public static YesNoMessageBox Show(String txt) { var a = new YesNoMessageBox(txt); a.Initialize(); a.isVisible = true; GUIEngine.AddHUDScene(a); return(a); }
public void deleteClick(object sender, InputEngine.MouseArgs e) { Sound.SoundPlayer.PlayButtonClick(); if (saves.SelectedIndex == -1) return; mb = YesNoMessageBox.Show("Are you sure you want\r\nto delete the following file: \r\n" + saves.GetSelected() + "?"); mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); GUIEngine.AddHUDScene(mb); }
protected void deleteClick(object sender, InputEngine.MouseArgs e) { Sound.SoundPlayer.PlayButtonClick(); if (saves.SelectedIndex == -1) { return; } mb = YesNoMessageBox.Show("Are you sure you want\r\nto delete the following file: \r\n" + saves.GetSelected() + "?"); mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); GUIEngine.AddHUDScene(mb); }
protected void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 1) { try { System.IO.File.Delete("Saves/" + folder + "/" + saves.GetSelected() + mask.Substring(1)); System.IO.File.Delete("Saves/" + folder + "/" + saves.GetSelected() + ".lua"); } catch { } } //GUIEngine.RemoveHUDScene(mb); mb.Dispose(); mb = null; FillListBox(); }
protected void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 1) { try { System.IO.File.Delete("Saves/" + folder + "/" + saves.GetSelected() + mask.Substring(1)); System.IO.File.Delete("Saves/" + folder + "/" + saves.GetSelected() + ".lua"); } catch { } } mb.Dispose(); mb = null; FillListBox(); tb_onTextChanged(null, null); }
protected virtual void mbReplace_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 1) { try { Save(); GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null); //GUIEngine.curScene = null; } catch { } } mb.Dispose(); mb = null; FillListBox(); tb_onTextChanged(null, null); }
void ig_Options_Save_onClicked(object sender, InputEngine.MouseArgs e) { if (!animItems.IsFadeOut) { InitMenuFor(inGameItems, ""); Settings.ChangeResolution(); if (Settings.Resolution != GUIEngine.s_optionsGraphics.origRes || GUIEngine.s_optionsGraphics.origFS != Settings.IsFullscreen) { resChangeMb = YesNoMessageBox.Show("Do you want to keep this resolution?\r\nChanges will be reverted in 15 second(s)"); resChangeMb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); TicksSinceResChange = 0; } Sound.SoundPlayer.PlayButtonClick(); Settings.Save(); } }
void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 1) { Statistics.Reset(); } }
protected virtual void saveClick(object sender, InputEngine.MouseArgs e) { Sound.SoundPlayer.PlayButtonClick(); if (tb.Text == "") return; try { if (saves.SelectedIndex != -1) { mb = YesNoMessageBox.Show("Are you sure you want to\r\nreplace existing file: \r\n" + saves.GetSelected() + "?"); mb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mbReplace_onButtonClicked); } else { Save(); GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null); //GUIEngine.curScene = null; } } catch { var a = OKMessageBox.Show("Wrong filename!"); a.onButtonClicked += new OKMessageBox.ButtonClickedEventHandler(a_onButtonClicked); } }
public static YesNoMessageBox Show(String txt) { var a = new YesNoMessageBox(txt); a.Initialize(); a.isVisible = true; GUIEngine.AddHUDScene(a); return a; }
void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 0) { Settings.Resolution = origRes; Settings.AspectRatio = origAR; Settings.IsFullscreen = origFS; co_resolution.text = origRes; co_aspectRation.text = origAR; cb_fullscreen.Checked = origFS; Settings.ChangeResolution(); } else { origAR = Settings.AspectRatio; origRes = Settings.Resolution; origFS = Settings.IsFullscreen; } resChangeMb.Close(); }
void Options_Save_onClicked(object sender, InputEngine.MouseArgs e) { if (!animItems.IsFadeOut) { InitMenuFor(items, "MENU"); Settings.ChangeResolution(); if (Settings.Resolution != GUIEngine.s_optionsGraphics.origRes || GUIEngine.s_optionsGraphics.origFS != Settings.IsFullscreen) { resChangeMb = YesNoMessageBox.Show("Do you want to keep this resolution?\r\nChanges will be reverted in 15 second(s)"); resChangeMb.onButtonClicked += new YesNoMessageBox.ButtonClickedEventHandler(mb_onButtonClicked); TicksSinceResChange = 0; } Sound.SoundPlayer.PlayButtonClick(); Settings.Save(); } }
void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e) { if (e.button == 0) { Settings.Resolution = GUIEngine.s_optionsGraphics.origRes; Settings.AspectRatio = GUIEngine.s_optionsGraphics.origAR; Settings.IsFullscreen = GUIEngine.s_optionsGraphics.origFS; Settings.ChangeResolution(); Settings.Save(); } resChangeMb.Close(); }