private void LoadContent() { width = _screen.ScreenManager.GraphicsDevice.Viewport.Width; height = _screen.ScreenManager.GraphicsDevice.Viewport.Height; bouton_taille = new Vector2((float)(width * 0.4), (float)(height * 0.1)); option_1_string = langue.getString(10); option_2_string = langue.getString(11); info = langue.getString(12); font_manage = new Police_Size_Manage(height, width, _screen); font_bold = font_manage.Get_Bold_Font(); font_regular = font_manage.Get_Regular_Font(); bouton_taille = new Vector2((float)(width * 0.4), (float)(height * 0.1)); position_bouton_1 = new Vector2((float)(width * 0.05), (float)(height * 0.7)); position_bouton_2 = new Vector2((float)(width * 0.55), (float)(height * 0.7)); r1 = new Rectangle((int)(position_bouton_1.X), (int)(position_bouton_1.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); r2 = new Rectangle((int)(position_bouton_2.X), (int)(position_bouton_2.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); marge = (int)(r1.Height * 0.1); bouton_1 = new Bouton(_screen, r1, font_regular, option_1_string, marge, 0, Color.White, color_bouton, font_manage._scale); bouton_2 = new Bouton(_screen, r2, font_regular, option_2_string, marge, 0, Color.White, color_bouton, font_manage._scale); int height_loading = (int)(r1.Height / 4); _loading = new LoadingSprite(_screen, height_loading, new Vector2((float)(r1.X + (r1.Width * 0.1)), r1.Y + r1.Height / 2), Color.White); }
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); }
public override void LoadContent() { width = ScreenManager.GraphicsDevice.Viewport.Width; height = ScreenManager.GraphicsDevice.Viewport.Height; r = new Rectangle(0, 0, width, height); font_manage = new Police_Size_Manage(height, width, this); font = font_manage.Get_Regular_Font(); string_1 = langue.getString(43); bouton_1_string = langue.getString(44); bouton_2_string = langue.getString(21); _no_co = new No_Connection_POPUP(this); _code = (string)IsolatedStorageSettings.ApplicationSettings ["code"]; _id = (string)IsolatedStorageSettings.ApplicationSettings ["id"]; int _loading_height = (int)(width * 0.05); _position_texte = new Vector2((float)(width / 2 - font.MeasureString(string_1).X *font_manage._scale / 2), (float)(height * 0.3)); _position_loading = new Vector2((float)(width * 0.6 + font.MeasureString(string_1).X *font_manage._scale / 2), (float)(height * 0.3 + font.MeasureString(string_1).Y *font_manage._scale / 2)); Vector2 bouton_taille = new Vector2((float)(width * 0.5), (float)(height * 0.15)); Vector2 position_bouton_1 = new Vector2((float)(width / 2 - bouton_taille.X / 2), (float)(height * 0.45)); Rectangle r1 = new Rectangle((int)(position_bouton_1.X), (int)(position_bouton_1.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); Rectangle r2 = new Rectangle((int)(position_bouton_1.X), (int)(height * 0.65), (int)(bouton_taille.X), (int)(bouton_taille.Y)); int marge = (int)(r1.Height * 0.1); _bouton_1 = new Bouton(this, r1, font, bouton_1_string, marge, 0, Color.White, color_bouton, font_manage._scale); _bouton_2 = new Bouton(this, r2, font, bouton_2_string, marge, 0, Color.White, color_bouton, font_manage._scale); _loading = new LoadingSprite(this, _loading_height, _position_loading, color_texte); if (server == null) { server = new Echange_Server_Class(); server.Ajout_Joueur_Liste_Attente(_id, _code); } else { if (!server.Echange_en_cours) { server.Verifier_Partie_trouver(_id, _code); } } popup = new Adversaire_Found_POPUP(this, server); base.LoadContent(); }
private void Statut_Envoie() { string caca = wait_creation_string; bouton_1 = new Bouton(this, r1, font_texte, caca, marge, 0, Color.White, color_green, font_manage._scale * 0.8f); _statut_bouton = Statut_Bouton.Envoie_Confirmation; int height_loading = (int)(r1.Height / 4); _loading = new LoadingSprite(this, height_loading, new Vector2((float)(r1.X + (r1.Width * 0.1)), r1.Y + r1.Height / 2), Color.White); string side = (string)IsolatedStorageSettings.ApplicationSettings ["side"]; server.Nouveau_Joueur(_name, side); }
private void LoadContent() { width = _screen.ScreenManager.GraphicsDevice.Viewport.Width; height = _screen.ScreenManager.GraphicsDevice.Viewport.Height; bouton_taille = new Vector2((float)(width * 0.4), (float)(height * 0.1)); info = langue.getString(13); string_accept = langue.getString(14); string_refuse = langue.getString(15); string_wait_adversaire = langue.getString(16); string_time = langue.getString(17); string_adversaire_refuse = langue.getString(18); string_menu = langue.getString(7); string_retour_file_attente = langue.getString(19); font_manage = new Police_Size_Manage(height, width, _screen); font_bold = font_manage.Get_Bold_Font(); font_regular = font_manage.Get_Regular_Font(); font_gros = font_manage.Get_Bold_Gros_Font(); _id = (string)IsolatedStorageSettings.ApplicationSettings ["id"]; _code = (string)IsolatedStorageSettings.ApplicationSettings ["code"]; bouton_taille = new Vector2((float)(width * 0.4), (float)(height * 0.1)); position_bouton_1 = new Vector2((float)(width * 0.05), (float)(height * 0.65)); position_bouton_2 = new Vector2((float)(width * 0.55), (float)(height * 0.65)); r1 = new Rectangle((int)(position_bouton_1.X), (int)(position_bouton_1.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); r2 = new Rectangle((int)(position_bouton_2.X), (int)(position_bouton_2.Y), (int)(bouton_taille.X), (int)(bouton_taille.Y)); marge = (int)(r1.Height * 0.1); bouton_1 = new Bouton(_screen, r1, font_regular, string_accept, marge, 0, Color.White, color_bouton, font_manage._scale); bouton_2 = new Bouton(_screen, r2, font_regular, string_refuse, marge, 0, Color.White, color_bouton, font_manage._scale); int _loading_height = (int)(width * 0.05); _position_texte = new Vector2((float)(width / 2 - font_bold.MeasureString(string_wait_adversaire).X *font_manage._scale / 2), (float)(height * 0.3)); _position_loading = new Vector2((float)(width * 0.6 + font_regular.MeasureString(string_wait_adversaire).X *font_manage._scale / 2), (float)(height * 0.3 + font_regular.MeasureString(string_wait_adversaire).Y *font_manage._scale / 2)); _loading = new LoadingSprite(_screen, _loading_height, _position_loading, color_texte); }