public void Draw()
        {
            if (_statut != Statut_Popup.Wait)
            {
                Rectangle r = new Rectangle(0, 0, width, height);
                _screen.ScreenManager.SpriteBatch.Draw(_screen.ScreenManager.BlankTexture, r, Color.White * (float)0.9);

                _screen.ScreenManager.SpriteBatch.DrawString(font_bold, info, new Vector2((float)(width / 2 - font_bold.MeasureString(info).X *font_manage._scale / 2), (float)(height * 0.2)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);

                bouton_1.Draw();
                bouton_2.Draw();
            }
        }
示例#2
0
        public override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
        {
            ScreenManager.SpriteBatch.Begin();

            ScreenManager.SpriteBatch.Draw(ScreenManager.BlankTexture, new Rectangle(0, 0, width, height), color_fond);

            ScreenManager.SpriteBatch.DrawString(font_titre, caca, new Vector2((float)(width / 2 - font_titre.MeasureString(caca).X *font_manage._scale / 2), (float)(height * 0.15)), color_texte * transition._transition_alpha, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            ScreenManager.SpriteBatch.Draw(back, position_back, new Rectangle(0, 0, (int)(back.Width), (int)(back.Height)), Color.White * transition._transition_alpha, 0f, new Vector2(0, 0), _scale, SpriteEffects.None, 1f);

            bouton_1.Draw(transition._transition_alpha);
            bouton_2.Draw(transition._transition_alpha);

            ScreenManager.SpriteBatch.DrawString(font_texte, info_bot, new Vector2((float)(width / 2 - font_texte.MeasureString(info_bot).X *font_manage._scale / 2), (float)(position_bouton_1.Y + bouton_taille.Y + bouton_taille.Y * 0.1)), color_texte * transition._transition_alpha, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);

            ScreenManager.SpriteBatch.End();

            base.Draw(gameTime);
        }
        public void Draw()
        {
            Rectangle r = new Rectangle(0, 0, width, height);

            _screen.ScreenManager.SpriteBatch.Draw(_screen.ScreenManager.BlankTexture, r, Color.White * (float)0.9);
            if (statut != Statut_Pop_Up.Accept && !_out_of_time && !_adversaire_refuse)
            {
                _screen.ScreenManager.SpriteBatch.DrawString(font_bold, info, new Vector2((float)(width / 2 - font_bold.MeasureString(info).X *font_manage._scale / 2), (float)(height * 0.1)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
            else if (!_out_of_time && !_adversaire_refuse)
            {
                _screen.ScreenManager.SpriteBatch.DrawString(font_bold, string_wait_adversaire, new Vector2((float)(width / 2 - font_bold.MeasureString(string_wait_adversaire).X *font_manage._scale / 2), (float)(height * 0.1)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
            else if (_out_of_time)
            {
                _screen.ScreenManager.SpriteBatch.DrawString(font_bold, string_time, new Vector2((float)(width / 2 - font_bold.MeasureString(string_time).X *font_manage._scale / 2), (float)(height * 0.1)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
            else if (_adversaire_refuse)
            {
                _screen.ScreenManager.SpriteBatch.DrawString(font_bold, string_adversaire_refuse, new Vector2((float)(width / 2 - font_bold.MeasureString(string_adversaire_refuse).X *font_manage._scale / 2), (float)(height * 0.1)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }

            bouton_1.Draw();
            bouton_2.Draw();

            if (_server.Echange_en_cours)
            {
                _loading.Draw(1f);
            }

            //DRAW COMPTE A REBOURS
            string rebours_string = "";

            rebours_string = (_timer._timer_max - _timer._timer).ToString() [0].ToString();

            if ((_timer._timer_max - _timer._timer) < 1000f)
            {
                rebours_string = "0";
            }
            if (!_out_of_time && !_adversaire_refuse)
            {
                _screen.ScreenManager.SpriteBatch.DrawString(font_gros, rebours_string, new Vector2((float)(width / 2 - font_bold.MeasureString(rebours_string).X *font_manage._scale / 2), (float)(height * 0.5)), color_texte, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
        }
示例#4
0
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.SpriteBatch.Begin();

            ScreenManager.SpriteBatch.Draw(ScreenManager.BlankTexture, new Rectangle(0, 0, width, height), color_fond);


            bouton_1.Draw();
            keyboard.Draw_Keyboard(this);
            ScreenManager.SpriteBatch.Draw(CaseLettre, position_texte, Color.White);
            ScreenManager.SpriteBatch.DrawString(font_texte, _name, new Vector2((float)(position_texte.X + (width * 0.05)), (float)(position_texte.Y + (CaseLettre.Height / 2) - font_texte.MeasureString(_name).Y *font_manage._scale / 2)), Color.Black, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            ScreenManager.SpriteBatch.DrawString(font_1, _name_string, new Vector2((float)(width / 2 - font_1.MeasureString(_name_string).X *font_manage._scale / 2), (float)(height * 0.1)), color_bouton, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);


            if (_error_nbr_letters)
            {
                ScreenManager.SpriteBatch.DrawString(font_1, _name_nbr_limit, new Vector2((float)(width / 2 - font_1.MeasureString(_name_nbr_limit).X *font_manage._scale / 2), (float)(height * 0.425)), color_red, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
            else if (_error_trop_de_letters)
            {
                ScreenManager.SpriteBatch.DrawString(font_1, _name_less_15, new Vector2((float)((width / 2) - (font_1.MeasureString(_name_less_15).X *font_manage._scale / 2)), (float)(height * 0.425)), color_red, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }
            else
            {
                ScreenManager.SpriteBatch.DrawString(font_1, _name_restrict_string, new Vector2((float)(width / 2 - font_1.MeasureString(_name_restrict_string).X *font_manage._scale / 2), (float)(height * 0.425)), color_bouton, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            }

            if (_loading != null & _statut_bouton == Statut_Bouton.Attente_Verification || _statut_bouton == Statut_Bouton.Envoie_Confirmation)
            {
                _loading.Draw(1f);
            }

            ScreenManager.SpriteBatch.Draw(_quit_texture, _quit_position, new Rectangle(0, 0, (int)(_quit_texture.Width), (int)(_quit_texture.Height)), Color.White, 0f, new Vector2(0, 0), font_manage._scale, SpriteEffects.None, 1f);

            _no_co.Draw();


            ScreenManager.SpriteBatch.End();

            base.Draw(gameTime);
        }
示例#5
0
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.SpriteBatch.Begin();

            ScreenManager.SpriteBatch.Draw(ScreenManager.BlankTexture, r, color_fond);

            bouton_1.Draw(transition._transition_alpha);
            bouton_2.Draw(transition._transition_alpha);
            bouton_3.Draw(transition._transition_alpha);

            Draw_Interface();
            Draw_Stats_Perso();

            ScreenManager.SpriteBatch.DrawString(font_tiny, _mail, new Vector2(position_width_info_joueur, (float)(height * 0.8)), color_texte * transition._transition_alpha, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);

            ScreenManager.SpriteBatch.End();
            if (_need_draw_check)
            {
                _draw_check = true;
            }

            base.Draw(gameTime);
        }
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.SpriteBatch.Begin();

            //FOND
            ScreenManager.SpriteBatch.Draw(ScreenManager.BlankTexture, r, color_fond);
            ScreenManager.SpriteBatch.DrawString(font, string_1, _position_texte, color_texte * transition._transition_alpha, 0f, Vector2.Zero, font_manage._scale, SpriteEffects.None, 1f);
            _bouton_1.Draw(transition._transition_alpha);
            _bouton_2.Draw(transition._transition_alpha);

            if (popup.is_active)
            {
                popup.Draw();
            }
            else
            {
                _loading.Draw(transition._transition_alpha);
            }

            _no_co.Draw();

            ScreenManager.SpriteBatch.End();
            base.Draw(gameTime);
        }
示例#7
0
 private void Draw_Bouton()
 {
     bouton_1.Draw();
     bouton_2.Draw();
 }