public override void Initialize() { lblMessage = new TSLabel(); lblMessage.Width = 300; lblMessage.Height = 60; lblMessage.MarginLeft = 50; lblMessage.MarginTop = 80; lblMessage.TextColor = Color.White; this.Add(lblMessage); menuLayout = new TSLayout(); menuLayout.MarginLeft = TSMarginType.CENTER; //-200; menuLayout.MarginBottom = TSMarginType.CENTER; //= 0; menuLayout.Width = 180; menuLayout.Height = 230; this.Add(menuLayout); btnStartGame = new TSButton("Bắt đầu"); btnStartGame.Width = 180; btnStartGame.Height = 40; btnStartGame.MarginLeft = 0; btnStartGame.MarginTop = 0; btnStartGame.MouseClick += btnStartGame_Click; menuLayout.Add(btnStartGame); btnIntroduction = new TSButton("Giới thiệu"); btnIntroduction.Width = 180; btnIntroduction.Height = 40; btnIntroduction.MarginLeft = 0; btnIntroduction.MarginTop = 45; btnIntroduction.MouseClick += btnIntroduction_Click; menuLayout.Add(btnIntroduction); btnSettings = new TSButton("Cài đặt"); btnSettings.Width = 180; btnSettings.Height = 40; btnSettings.MarginLeft = 0; btnSettings.MarginTop = 90; btnSettings.MouseClick += btnSettings_Click; menuLayout.Add(btnSettings); btnAbout = new TSButton("Về trò chơi"); btnAbout.Width = 180; btnAbout.Height = 40; btnAbout.MarginLeft = 0; btnAbout.MarginTop = 135; btnAbout.MouseClick += btnAbout_Click; menuLayout.Add(btnAbout); btnExitGame = new TSButton("Thoát"); btnExitGame.Width = 180; btnExitGame.Height = 40; btnExitGame.MarginLeft = 0; btnExitGame.MarginTop = 180; btnExitGame.MouseClick += btnExitGame_Click; menuLayout.Add(btnExitGame); }
// Label public void ToStandardLabel(TSLabel label) { if (label != null) { label.Font = LabelFont; } }