Beispiel #1
0
        public ResultsState()
        {
            TextLabel baseLabel = new TextLabel()
            {
                Font = new Font("Arial", 50, FontStyle.Bold)
            };

            scorePositionLabel          = baseLabel.Clone();
            scorePositionLabel.Location = new Point(Program.Width / 2 - labelDistanceX, Program.Height / 2);
            scorePositionLabel.Text     = "Score:";

            gradePositionLabel          = baseLabel.Clone();
            gradePositionLabel.Location = new Point(Program.Width / 2 - labelDistanceX, Program.Height / 2 + labelDistanceY);
            gradePositionLabel.Text     = "Grade:";

            answersPositionLabel          = baseLabel.Clone();
            answersPositionLabel.Location = new Point(Program.Width / 2 - labelDistanceX, Program.Height / 2 - labelDistanceY);
            answersPositionLabel.Text     = "Correct:";

            scoreLabel          = baseLabel.Clone();
            scoreLabel.Location = new Point(Program.Width / 2 + labelDistanceX, Program.Height / 2);

            answersLabel          = baseLabel.Clone();
            answersLabel.Location = new Point(Program.Width / 2 + labelDistanceX, Program.Height / 2 - labelDistanceY);

            gradeLabel          = baseLabel.Clone();
            gradeLabel.Location = new Point(Program.Width / 2 + labelDistanceX, Program.Height / 2 + labelDistanceY);
            gradeLabel.Font     = new Font("Arial", 70, FontStyle.Bold);

            returnButton            = new Button(new Point(Program.Width - 170, Program.Height - 50), new Size(250, 50));
            returnButton.Label.Text = "Return to Menu";
            returnButton.DrawMode   = DrawMode.Centered;
            returnButton.OnSelect  += ReturnPressed;
        }