public void SetupHighscores() { NoDataFailure = new Gwen.Control.Label(BaseCanvas); NoDataFailure.SetText("No Highscore Data Retrieved"); NoDataFailure.AutoSizeToContents = true; NoDataFailure.SetPosition(100, 150); TopScoresLabel = new Gwen.Control.Label(BaseCanvas); TopScoresLabel.SetText("Highscores"); TopScoresLabel.SetSize(100, 50); TopScoresLabel.SetPosition(250, 50); TopScoresList = new Gwen.Control.ListBox(BaseCanvas); TopScoresList.SetSize(220, 210); TopScoresList.SetPosition(180, 70); TopScoresBackButton = new Gwen.Control.Button(BaseCanvas); TopScoresBackButton.SetText("Back"); TopScoresBackButton.AutoSizeToContents = true; TopScoresBackButton.SetPosition(50, 350); TopScoresBackButton.Clicked += (B, Args) => { ActiveScreen = Screen.Menu; }; }
public void OnLoad(EventArgs e) { Renderer = new Gwen.Renderer.OpenTK(); _skin = new Gwen.Skin.TexturedBase(Renderer, "Content/DefaultSkin.png"); Canvas = new Gwen.Control.Canvas(_skin); _input = new Gwen.Input.OpenTK(Program.Game); _input.Initialize(Canvas); Canvas.SetSize((int)Program.Game.windowSize.X, (int)Program.Game.windowSize.Y); Canvas.ShouldDrawBackground = false; Canvas.BackgroundColor = Color.FromArgb(255, 150, 170, 170); SetupInputEvents(); _sideMenuBox = new Gwen.Control.GroupBox(_canvas); _sideMenuBox.SetSize(80, 128); _sideMenuBox.Position(Gwen.Pos.Center); _sideMenuBox.Position(Gwen.Pos.Right, 5); LoadElementCatagories(); // Current element text _currentElementLabel = new Gwen.Control.Label(_canvas); _currentElementLabel.SetPosition(10, 10); _currentElementLabel.SetSize(100, 40); _currentElementLabel.SetText(""); // Bottom menu _bottomMenuBox = new Gwen.Control.GroupBox(_canvas); _bottomMenuBox.SetSize(800, 36); _bottomMenuBox.Position(Gwen.Pos.Center); _bottomMenuBox.Position(Gwen.Pos.Bottom); _bottomMenuBox.ShouldDrawBackground = true; }