public override void Initialize() { LecteurIP = new EntréeDeTexte(Game, new Vector2(3 * Game.Window.ClientBounds.Width / 5, 2 * Game.Window.ClientBounds.Height / 3), "Arial", 14); base.Initialize(); ObjetsSélectionnables.Add(LecteurIP); Composantes.Add(LecteurIP); Activer(); }
public override void Initialize() { ObjetsSélectionnables = new List <ISélectionnable>(); LecteurPort = new EntréeDeTexte(Game, new Vector2(3 * Game.Window.ClientBounds.Width / 5, Game.Window.ClientBounds.Height / 3), "Arial", 6); ObjetsSélectionnables.Add(LecteurPort); base.Initialize(); Composantes.Add(new ArrièrePlan(Game, "Carte")); Composantes.Add(new Titre(Game, "Port : ", "Arial", new Vector2(Game.Window.ClientBounds.Width / 5, Game.Window.ClientBounds.Height / 3), "Blanc", false, Color.White)); Composantes.Add(LecteurPort); Composantes.Add(new Titre(Game, "IP :", "Arial", new Vector2(Game.Window.ClientBounds.Width / 5, 2 * Game.Window.ClientBounds.Height / 3), "Blanc", false, Color.White)); Composantes.Add(new BoutonDeCommande(Game, "OK", "Arial", "BoutonVert", "BoutonNoir", new Vector2(Game.Window.ClientBounds.Width / 2, 4 * Game.Window.ClientBounds.Height / 5), true, Lire, 0.01f)); Composantes.Add(new BoutonDeCommande(Game, "Retour", "Arial", "BoutonVert", "BoutonNoir", new Vector2(Game.Window.ClientBounds.Width / 5, 8 * Game.Window.ClientBounds.Height / 9), true, Retour, 0.01f)); GestionInput = Game.Services.GetService(typeof(InputManager)) as InputManager; }
public override void Initialize() { List <string> noms = new List <string>(); noms.Add("choix1"); noms.Add("choix2"); noms.Add("choix3"); noms.Add("choix4"); LecteurPseudonyme = new EntréeDeTexte(Game, new Vector2(3 * Game.Window.ClientBounds.Width / 4, Game.Window.ClientBounds.Height / 4), "Arial20", 10); ChoixVoiture = new DéfileurSprite(Game, noms, new Rectangle(0, Game.Window.ClientBounds.Height / 3, Game.Window.ClientBounds.Width, 2 * Game.Window.ClientBounds.Height / 3), 0.001f); BtnDémarrer = new BoutonDeCommande(Game, "Démarrer", "Arial", "BoutonVert", "BoutonNoir", new Vector2(2 * Game.Window.ClientBounds.Width / 3, 8 * Game.Window.ClientBounds.Height / 9), false, Démarrer, 0.01f); BtnValider = new BoutonDeCommande(Game, "Valider", "Arial", "BoutonVert", "BoutonNoir", new Vector2(Game.Window.ClientBounds.Width / 3, 8 * Game.Window.ClientBounds.Height / 9), true, Valider, 0.01f); base.Initialize(); Composantes.Add(new ArrièrePlan(Game, "MenuOption")); Composantes.Add(new Titre(Game, "Pseudonyme: ", "Arial", new Vector2(Game.Window.ClientBounds.Width / 4, Game.Window.ClientBounds.Height / 4), "Blanc", false, Color.White)); Composantes.Add(LecteurPseudonyme); Composantes.Add(ChoixVoiture); Composantes.Add(BtnDémarrer); Composantes.Add(BtnValider); Activer(); }