Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 7
0
 public void sbClick(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(CameFromScene, CameFromState);
     //Main.curState = CameFromState;
     //GUIEngine.curScene = CameFromScene;
 }
Exemplo n.º 8
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(lastScene, lastState);
     //Main.curState = lastState;
     //GUIEngine.curScene = lastScene;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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");
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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();
        }
Exemplo n.º 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";
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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();
        }
Exemplo n.º 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();
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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;
        }
Exemplo n.º 25
0
 protected void backClick(object sender, InputEngine.MouseArgs e)
 {
     GUIEngine.ChangeScene(Graphics.GUI.GUIEngine.s_game, null);
     //Main.curState = "GUISandbox";
     //GUIEngine.curScene = null;
 }
Exemplo n.º 26
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(LastScene, LastState);
 }
Exemplo n.º 27
0
 void back_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_mainMenu, "GUIMainMenu");
 }
Exemplo n.º 28
0
 void ldesign_onClicked(object sender, InputEngine.MouseArgs e)
 {
     Sound.SoundPlayer.PlayButtonClick();
     GUIEngine.ChangeScene(GUIEngine.s_lvlDesignerMenu, "GUIlvlDesignerMenu");
 }