Esempio n. 1
0
 public TestRootForm()
     : this("RootOne")
 {
     ScreenState = UIScreenEnum.MainMenu;
 }
Esempio n. 2
0
        /// <summary>
        /// Switch the screen between the main menu and the various sub menus.
        /// </summary>
        private void SwitchMenuScreen(UIScreenEnum e)
        {
            if (((TestRootForm)UI.RootForm).ScreenState != UIScreenEnum.EnterName)
            {
                IGameControl c = UI.RootForm.GetControl("Button_NewGame");
                c.Visible = !c.Visible;
                UI.RootForm.GetControl("Button_Options").Visible = c.Visible;
                UI.RootForm.GetControl("Button_HiScore").Visible = c.Visible;
                UI.RootForm.GetControl("Button_Help").Visible = c.Visible;
                UI.RootForm.GetControl("Button_Quit").Visible = c.Visible;
                UI.RootForm.GetControl("Button_Ok").Visible = !c.Visible;
            }
            ((TestRootForm)UI.RootForm).ScreenState = e;

            UI.RootForm.GetControl("Label_HelpText").Visible = (e == UIScreenEnum.Help);
            UI.RootForm.GetControl("HiScoreTable").Visible = (e == UIScreenEnum.Hiscore);
            UI.RootForm.GetControl("HiScoreLabel").Visible = (e == UIScreenEnum.EnterName);
            UI.RootForm.GetControl("KeyboardTestLabel").Visible = (e == UIScreenEnum.EnterName);

            //Options screen controls
            UI.RootForm.GetControl("OptionsMainLabel").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("OptionsLabels").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("OptionsCheckFullscreen").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("OptionsCheckBloom").Visible = false; //Never let them turn bloom off.
            UI.RootForm.GetControl("OptionsCheckMusicMute").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("OptionsCheckSFXMute").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderViewDist").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderBloom").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderParticles").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderMusic").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderSFX").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderDisplayMode").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("SliderSampling").Visible = (e == UIScreenEnum.Options);
            UI.RootForm.GetControl("sliderlabel").Visible = (e == UIScreenEnum.Options);
        }