Esempio n. 1
0
 public Resolution()
 {
     xPos = 3 * TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new BoutonTexte(xPos, yPos + 100);
     bouton2 = new BoutonTexte(xPos, yPos + 200);
     bouton3 = new BoutonTexte(xPos, yPos + 300);
     bouton4 = new BoutonTexte(xPos, yPos + 450);
     bouton1.Texte = "1920x1080";
     bouton2.Texte = "1600x900";
     bouton3.Texte = "1280x720";
     bouton4.Texte = "Retour";
 }
Esempio n. 2
0
 public Options()
 {
     xPos = 3 * TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new BoutonTexte(xPos, yPos + 100);
     bouton2 = new BoutonTexte(xPos, yPos + 200);
     bouton3 = new BoutonTexte(xPos, yPos + 300);
     bouton4 = new BoutonTexte(xPos, yPos + 450);
     bouton1.Texte = "Son";
     bouton2.Texte = "Resolution";
     bouton3.Texte = "Plein Ecran";
     bouton4.Texte = "Retour";
 }
Esempio n. 3
0
    public PopUp(string question)
    {
        Ins              = RessourceGraphique.Instance;
        mFenetre         = Ins.Fenetre;
        mCadre           = new RectangleShape();
        mCadre.Size      = new Vector2f(0.3f * VideoMode.DesktopMode.Width, 0.15f * VideoMode.DesktopMode.Height);
        mCadre.Position  = new Vector2f(VideoMode.DesktopMode.Width / 2 - mCadre.Size.X / 2, VideoMode.DesktopMode.Height / 2 - mCadre.Size.Y / 2);
        mCadre.FillColor = Color.Black;

        mQuestion                 = new Text();
        mQuestion.Font            = Font.DefaultFont;
        mQuestion.Color           = Color.White;
        mQuestion.Scale           = new Vector2f(1.0f * ((float)VideoMode.DesktopMode.Width / 1920.0f), 1.0f * ((float)VideoMode.DesktopMode.Height / 1080.0f));
        mQuestion.DisplayedString = question;
        mQuestion.Position        = new Vector2f(mCadre.Position.X + (mCadre.Size.X / 2 - (mQuestion.GetGlobalBounds().Width *((float)VideoMode.DesktopMode.Width / 1920.0f)) / 2), mCadre.Position.Y + (mQuestion.GetGlobalBounds().Height *((float)VideoMode.DesktopMode.Width / 1920.0f)));


        mBoutonOui = new BoutonTexte(0.0f, 0.0f, "Oui", mCadre.Size.X / 4.0f, mCadre.Size.Y / 4.0f, Color.Blue, Color.Green);
        mBoutonOui.Positionner(mCadre.Position.X + (mCadre.Size.X * 0.25f - mBoutonOui.TailleX / 2), mCadre.Position.Y + (mCadre.Size.Y * 0.75f - mBoutonOui.TailleY / 2), VideoMode.DesktopMode.Width, VideoMode.DesktopMode.Height);
        mBoutonNon = new BoutonTexte(0.0f, 0.0f, "Non", mCadre.Size.X / 4.0f, mCadre.Size.Y / 4.0f, Color.Blue, Color.Green);
        mBoutonNon.Positionner(mCadre.Position.X + (mCadre.Size.X * 0.75f - mBoutonNon.TailleX / 2), mCadre.Position.Y + (mCadre.Size.Y * 0.75f - mBoutonNon.TailleY / 2), VideoMode.DesktopMode.Width, VideoMode.DesktopMode.Height);
    }
Esempio n. 4
0
 public void AjouterBouton(BoutonTexte bouton)
 {
     m_boutons.Add(bouton);
 }