void helpButton_MouseClick(GUIElement sender, MouseEventArgs e)
 {
     InstructionsMenuFrame instructionsFrame = new InstructionsMenuFrame();
     UIManager.AddAndLoad(instructionsFrame);
 }
 void quitButton_MouseClick(GUIElement sender, MouseEventArgs e)
 {
     GameEngine.Singleton.DestroyAndRemoveStates(2);
 }
 void continueButton_MouseClick(GUIElement sender, MouseEventArgs e)
 {
     this.Exit();
 }
        void EnterButton_MouseClick(GUIElement sender, MouseEventArgs e)
        {
            Size previousWindowSize = (Size)Utilities.DefaultSettings.Settings["WindowSize"];
            float previousPixelsPerMeterValue = (float) Utilities.DefaultSettings.Settings["PixelsPerMeter"];
            bool previousTriviaQuestionsValue = (bool) Utilities.DefaultSettings.Settings["Trivia Questions"];

            bool triviaQuestionsValue;
            float windowSizeXValue;
            float windowSizeYValue;
            float pixelsPerMeterValue;

            if (trueFalseButton.TrueOrFalse)
                triviaQuestionsValue = true;
            else
                triviaQuestionsValue = false;

            windowSizeXValue = float.Parse(WindowSizeXBox.Text);
            windowSizeYValue = float.Parse(WindowSizeYBox.Text);
            pixelsPerMeterValue = float.Parse(PixelsPerMeterBox.Text);
            Utilities.DefaultSettings.Settings["WindowSize"] = new Size(windowSizeXValue,windowSizeYValue);
            Utilities.DefaultSettings.Settings["PixelsPerMeter"] =  pixelsPerMeterValue;

            bool changedSettings = false;

            if (pixelsPerMeterValue != previousPixelsPerMeterValue
                || triviaQuestionsValue != previousTriviaQuestionsValue
                || windowSizeXValue != previousWindowSize.X
                || windowSizeYValue != previousWindowSize.Y)
                changedSettings = true;
               if (changedSettings)
               {
               this.Exit();
               UIManager.AddAndLoad(userMessageFrame);
               }
               this.Exit();
        }
 void trueFalseButton_MouseClick(GUIElement sender, MouseEventArgs e)
 {
     if (trueFalseButton.TrueOrFalse)
         trueFalseButton.TrueOrFalse = false;
     else
         trueFalseButton.TrueOrFalse = true;
 }
 void SelectGame(GUIElement sender, MouseEventArgs e)
 {
     var label = (Label)sender;
     GameEngine.Singleton.AddAndLoad(new TheGameState(label.Text, false));
 }
 protected override void OnMouseClick(MouseEventArgs e)
 {
     Parent.ActiveControl = this;
     base.OnMouseClick(e);
 }