public override void LoadContent() { Sortie_ecran = TypeEcranAnnimation.Rien; width = ScreenManager.GraphicsDevice.Viewport.Width; height = ScreenManager.GraphicsDevice.Viewport.Height; bouton_taille = new Vector2((float)(width * 0.4), (float)(height * 0.1)); jouer = langue.getString(20); quitter = langue.getString(21); rank_string = langue.getString(22); position_width_info_joueur = (int)(width * 0.55); position_1 = new Vector2((float)(width * 0.05), (float)(height * 0.45)); position_2 = new Vector2((float)(width * 0.05), (float)(height * 0.6)); position_3 = new Vector2((float)(width * 0.05), (float)(height * 0.75)); font_manage = new Police_Size_Manage(height, width, this); font_bouton = font_manage.Get_Regular_Font(); font_titre = font_manage.Get_Bold_Font(); font_mega_titre = font_manage.Get_Bold_Gros2_Font(); font_tiny = font_manage.Get_Regular_Petit_Font(); r = new Rectangle(0, 0, width, height); Rectangle r1, r2, r3; r1 = new Rectangle((int)(position_1.X), (int)(position_1.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); r2 = new Rectangle((int)(position_2.X), (int)(position_2.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); r3 = new Rectangle((int)(position_3.X), (int)(position_3.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); int marge = (int)(r1.Height * 0.1); bouton_1 = new Bouton(this, r1, font_bouton, jouer, marge, 0, Color.White, color_bouton, font_manage._scale); bouton_2 = new Bouton(this, r2, font_bouton, option_string, marge, 0, Color.White, color_bouton, font_manage._scale); bouton_3 = new Bouton(this, r3, font_bouton, quitter, marge, 0, Color.White, color_bouton, font_manage._scale); id = (string)IsolatedStorageSettings.ApplicationSettings ["id"]; player_name = (string)IsolatedStorageSettings.ApplicationSettings ["name"]; side = (string)IsolatedStorageSettings.ApplicationSettings ["side"]; if (IsolatedStorageSettings.ApplicationSettings ["red_win"] != null) { red_win = (string)IsolatedStorageSettings.ApplicationSettings ["red_win"]; green_win = (string)IsolatedStorageSettings.ApplicationSettings ["green_win"]; player_elo = (string)IsolatedStorageSettings.ApplicationSettings ["elo"]; player_game = (string)IsolatedStorageSettings.ApplicationSettings ["player_game"]; player_rank = (string)IsolatedStorageSettings.ApplicationSettings ["rank"]; player_win = (string)IsolatedStorageSettings.ApplicationSettings ["player_win"]; } if (id != null) { server.Main_Menu_Info(id, player_name); } else if (!_name_check) { server.Check_Name(player_name); } base.LoadContent(); }
private void Statut_Loading() { string caca = wait_string; bouton_1 = new Bouton(this, r1, font_texte, caca, marge, 0, Color.White, color_case_vide, font_manage._scale); _statut_bouton = Statut_Bouton.Attente_Verification; int height_loading = (int)(r1.Height / 2); _loading = new LoadingSprite(this, height_loading, new Vector2(r1.X + (r1.Width / 2 - font_texte.MeasureString(caca).X *font_manage._scale / 2 - height_loading), r1.Y + r1.Height / 2), Color.White); server.Check_Name(_name); }