예제 #1
0
 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;
 }
예제 #2
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);
     }
 }
예제 #3
0
        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);
        }
예제 #4
0
        public static YesNoMessageBox Show(String txt)
        {
            var a = new YesNoMessageBox(txt);

            a.Initialize();
            a.isVisible = true;
            GUIEngine.AddHUDScene(a);
            return(a);
        }
예제 #5
0
 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);
 }
예제 #6
0
 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);
 }
예제 #7
0
 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();
 }
예제 #8
0
 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);
 }
예제 #9
0
 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);
 }
예제 #10
0
        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();
            }
        }
예제 #11
0
 void mb_onButtonClicked(object sender, YesNoMessageBox.ButtonClickedArgs e)
 {
     if (e.button == 1)
     {
         Statistics.Reset();
     }
 }
예제 #12
0
 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);
 }
예제 #13
0
 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);
 }
예제 #14
0
 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();
 }
예제 #15
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);
     }
 }
예제 #16
0
 public static YesNoMessageBox Show(String txt)
 {
     var a = new YesNoMessageBox(txt);
     a.Initialize();
     a.isVisible = true;
     GUIEngine.AddHUDScene(a);
     return a;
 }
예제 #17
0
 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();
 }
예제 #18
0
        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();
            }
        }
예제 #19
0
 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;
 }
예제 #20
0
 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();
 }