예제 #1
0
 public void newClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_levelSelection, "GUILevelSelector");
     //Main.curState = "GUILevelSelector";
     //GUIEngine.curScene = GUIEngine.s_levelSelector;
 }
예제 #2
0
 public override void backClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_lvlDesignerMenu, "GAMElvlDesignerMenu");
     //Main.curState = "GUILevels";
     //GUIEngine.curScene = GUIEngine.s_levelsMenu;
 }
예제 #3
0
 void Sandbox_NewBox_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Logics.GameLogicsHelper.InitForGame();
     GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, "GAMESandbox");
     GUIEngine.s_componentSelector.ClearCount();
     Logics.GameLogicsHelper.InitScenesForGame();
 }
예제 #4
0
 public void backClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
     //Main.curState = "GUIMainMenu";
     //GUIEngine.curScene = GUIEngine.s_mainMenu;
 }
예제 #5
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);
     }
 }
예제 #6
0
 public void lvlClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_levelsMenu, "GUILevels");
     //Main.curState = "GUILevels";
     //GUIEngine.curScene = GUIEngine.s_levelsMenu;
 }
예제 #7
0
 public void sbClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(CameFromScene, CameFromState);
     //Main.curState = CameFromState;
     //GUIEngine.curScene = CameFromScene;
 }
예제 #8
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(lastScene, lastState);
     //Main.curState = lastState;
     //GUIEngine.curScene = lastScene;
 }
예제 #9
0
 public void loadClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_sandboxLoadMenu, "GUISandboxLoad");
     //Main.curState = "GUISandboxLoad";
     //GUIEngine.curScene = GUIEngine.s_sandboxLoadMenu;
 }
예제 #10
0
 void animItems_onFadeOutFinish2(object sender)
 {
     GUIEngine.RemoveHUDScene(this);
     GUIEngine.ChangeScene(this, "GUIMainMenu");
     GUIEngine.ClearHUDs();
     Logics.LevelEngine.Stop();
     Graphics.GraphicsEngine.camera.Center = new Vector2();
 }
예제 #11
0
 void encyclopedia_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.s_encyclopediaBrowser.lastScene = GUIEngine.curScene;
     GUIEngine.s_encyclopediaBrowser.lastState = Main.curState;
     GUIEngine.s_encyclopediaBrowser.ResetState();
     GUIEngine.ChangeScene(GUIEngine.s_encyclopediaBrowser, "GUIEncyclopediaBrowser");
 }
예제 #12
0
 void options_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.s_options.CameFromState = Main.curState;
     GUIEngine.s_options.CameFromScene = GUIEngine.curScene;
     GUIEngine.ChangeScene(GUIEngine.s_options, "GUIOptions");
     //Main.curState = "GUIOptions";
     //GUIEngine.curScene = GUIEngine.s_options;
 }
예제 #13
0
 public void stClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.s_statistics2.CameFromState = Main.curState;
     GUIEngine.s_statistics2.CameFromScene = GUIEngine.curScene;
     GUIEngine.ChangeScene(GUIEngine.s_statistics2, "GUIStatistics");
     //Main.curState = "GUIStatistics";
     //GUIEngine.curScene = GUIEngine.s_statistics;
 }
예제 #14
0
 void mainmenu_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
     //Main.curState = "GUIMainMenu";
     //GUIEngine.curScene = GUIEngine.s_mainMenu;
     GUIEngine.ClearHUDs();
     Logics.LevelEngine.Stop();
     Graphics.GraphicsEngine.camera.Center = new Vector2();
 }
예제 #15
0
        void menu_onClicked(object sender, InputEngine.MouseArgs e)
        {
            Logics.LevelEngine.GameUpdates = 0;
            Sound.SoundPlayer.PlayButtonClick();
            Logics.GameLogicsHelper.GameStop();
            GUIEngine.s_levelSelection.RefreshCompletionState();

            GUIEngine.s_mainMenu.InitMenuFor(GUIEngine.s_mainMenu.items, "MENU", true);

            GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
            //GUIEngine.s_levelSelection.CurTab = GUIEngine.s_levelSelection.SelectedTab;
            GUIEngine.ClearHUDs();
        }
예제 #16
0
        protected virtual void _load()
        {
            //Logics.LevelEngine.Stop();
            //Logics.GameInputHandler.PlacableAreas.Clear();
            //Settings.ResetInGameSettings();
            Logics.GameLogicsHelper.InitForGame();

            IO.SaveEngine.LoadAll("Saves/" + folder + "/" + saves.GetSelected() + mask.Substring(1));

            GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, "GAMESandbox");
            //GUIEngine.curScene = null;
            //Main.curState = "GAMESandbox";
        }
예제 #17
0
 public void StartNextLevel()
 {
     selectedLevel++;
     if (selectedLevel >= TABS_LEVELS_COUNT[SelectedTab])
     {
         Sound.SoundPlayer.PlayButtonClick();
         GUIEngine.ChangeScene(GUIEngine.s_levelSelection, "GUILevelSelector");
     }
     else
     {
         selectedFile = selectedFile.Substring(0, selectedFile.LastIndexOf("/") + 1) + selectedLevel.ToString();
         StartLevel();
     }
 }
예제 #18
0
        public void loadClick(object sender, InputEngine.MouseArgs e)
        {
            Sound.SoundPlayer.PlayButtonClick();
            if (saves.SelectedIndex == -1)
            {
                return;
            }

            GUIEngine.ChangeScene(GUIEngine.s_loading, "GUILoading");
            //GUIEngine.curScene = GUIEngine.s_loading;
            //Main.curState = "GUILoading";

            System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(_load));
            t.Start();
        }
예제 #19
0
 public void StartNextLevel()
 {
     GUIEngine.RemoveHUDScene(GUIEngine.s_tutorial);
     selectedLevel++;
     if (selectedLevel >= items.Count)
     {
         Sound.SoundPlayer.PlayButtonClick();
         GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
     }
     else
     {
         selectedFile = selectedFile.Substring(0, selectedFile.LastIndexOf("/") + 1) + selectedLevel.ToString();
         StartLevel();
     }
 }
예제 #20
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);
 }
예제 #21
0
        public void newClick(object sender, InputEngine.MouseArgs e)
        {
            Sound.SoundPlayer.PlayButtonClick();

            //Logics.CircuitManager.Clear();
            //Components.ComponentsManager.Clear();
            //Logics.LevelEngine.Stop();
            //Logics.GameInputHandler.PlacableAreas.Clear();
            //Settings.ResetInGameSettings();
            Logics.GameLogicsHelper.InitForGame();

            //Main.curState = "GAMESandbox";
            newGame = true;
            GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, "GAMESandbox");
            GUIEngine.s_componentSelector.ClearCount();
            //Graphics.GUI.GUIEngine.s_componentSelector.SelectedIndex = 0;
            //GUIEngine.curScene = null;
        }
예제 #22
0
 void save_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     //Main.curState = "GUISandbox";
     if (Main.curState == "GAMESandbox")
     {
         GUIEngine.ChangeScene(GUIEngine.s_sandboxSaveMenu, null);
         //GUIEngine.curScene = GUIEngine.s_sandboxSaveMenu;
     }
     else if (Main.curState == "GAMELevels")
     {
         GUIEngine.ChangeScene(GUIEngine.s_levelsSaveMenu, null);
         //GUIEngine.curScene = GUIEngine.s_levelsSaveMenu;
     }
     else if (Main.curState == "GAMElvlDesign")
     {
         GUIEngine.ChangeScene(GUIEngine.s_lvlDesignerSave, null);
     }
 }
예제 #23
0
        void b_onClicked(object sender, InputEngine.MouseArgs e)
        {
            var tag = (sender as Button).tag as object[];

            if ((bool)(tag)[1])//this is file
            {
                GUIEngine.s_encyclopediaPage.LastState = Main.curState;
                GUIEngine.s_encyclopediaPage.LastScene = GUIEngine.curScene;
                GUIEngine.ChangeScene(GUIEngine.s_encyclopediaPage, "GUIEncyclopedia");
                //Main.curState = "GUIEncyclopedia";
                //GUIEngine.curScene = GUIEngine.s_encyclopediaPage;
                GUIEngine.s_encyclopediaPage.OpenPage(tag[0] as String);
            }
            else//this is folder
            {
                curFolder = tag[0] as String;
                curPage   = 0;
                InitForCurState();
            }
        }
예제 #24
0
        public void sacClick(object sender, InputEngine.MouseArgs e)
        {
            //if (Settings.Resolution != res.text)
            //{
            Settings.AspectRatio  = ar.text;
            Settings.Resolution   = res.text;
            Settings.IsFullscreen = fs.Checked;
            //}
            Settings.ChangeResolution();
            Sound.SoundPlayer.PlayButtonClick();
            Settings.Save();
            GUIEngine.ChangeScene(CameFromScene, CameFromState);

            #region Hotkeys
            //Settings.k_SimulationStart = hcSimStart.Key;
            //Settings.k_SimulationStop = hcSimStop.Key;
            //Settings.k_SimulationPause = hcSimPause.Key;
            #endregion
            //Main.curState = CameFromState;
            //GUIEngine.curScene = CameFromScene;
        }
예제 #25
0
 protected void backClick(object sender, InputEngine.MouseArgs e)
 {
     GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null);
     //Main.curState = "GUISandbox";
     //GUIEngine.curScene = null;
 }
예제 #26
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(LastScene, LastState);
 }
예제 #27
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
 }
예제 #28
0
 void ldesign_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_lvlDesignerMenu, "GUIlvlDesignerMenu");
 }