public PhoneMainMenuScreen() : base("Racing Rage") { // Create a button to start the game Button playButton = new Button("Play"); playButton.Tapped += playButton_Tapped; MenuButtons.Add(playButton); playButton.Size = new Vector2(300, 100); BooleanButton musicButton = new BooleanButton("Music", true); musicButton.Tapped += musicButton_Tapped; MenuButtons.Add(musicButton); BooleanButton sfxButton = new BooleanButton("Sound", true); sfxButton.Tapped += sfxButton_Tapped; MenuButtons.Add(sfxButton); Button controlButton = new Button("Control: Gyro"); controlButton.Tapped += controlButton_Tapped; MenuButtons.Add(controlButton); Button creditsButton = new Button("Credits"); creditsButton.Tapped += creditsButton_Tapped; MenuButtons.Add(creditsButton); }
private void InitilizeLanguages() { valider = lang.AffectationLANG("BOUTON_Valider", langue); changer_nom = lang.AffectationLANG("Menu_changer_nom", langue); lettre_max = lang.AffectationLANG("Menu_changer_nom_lettres_max", langue); nom = lang.AffectationLANG("Nom", langue); theme_string = lang.AffectationLANG("Themes", langue); vibration_string = lang.AffectationLANG("Vibration", langue); voir_score = lang.AffectationLANG("Score_String", langue); aide = lang.AffectationLANG("Aide", langue); rate = lang.AffectationLANG("Noter", langue); Button theme1; if (theme == "classic") { theme1 = new Button("Classic", new Vector2(align_x2, y1)); } else { theme1 = new Button("Tuiles", new Vector2(align_x2, y1)); } Button nom_joueur = new Button(_nom_joueur, new Vector2(align_x2, y2)); Button _voir_score = new Button(voir_score, new Vector2(align_x2, y4)); Button AideBouton = new Button(aide, new Vector2(align_x2, y5)); Button RateBouton = new Button(rate, new Vector2(align_x2, y6)); BooleanButton vibrationButton = new BooleanButton(vibrate, new Vector2(align_x2, y3)); Vector2 _size = new Vector2(200, 60); Vector2 _position = new Vector2(150, 700); Button Retour = new Button(valider.ToUpper(), _size, _position, new Color(106, 181, 1), new Color(126, 215, 2), Color.White); theme1.Tapped += ThemeVoid; nom_joueur.Tapped += ChangerNom; vibrationButton.Tapped += ChangerVibrate; _voir_score.Tapped += VoirScore; AideBouton.Tapped += GoAide; RateBouton.Tapped += Rating; Retour.Tapped += Quitter; MenuButtons.Add(theme1); MenuButtons.Add(nom_joueur); MenuButtons.Add(vibrationButton); MenuButtons.Add(_voir_score); MenuButtons.Add(AideBouton); MenuButtons.Add(RateBouton); MenuButtons.Add(Retour); }
public PhoneMainMenuScreen() : base("Main Menu") { // Create a button to start the game Button playButton = new Button("Play"); playButton.Tapped += playButton_Tapped; MenuButtons.Add(playButton); // Create two buttons to toggle sound effects and music. This sample just shows one way // of making and using these buttons; it doesn't actually have sound effects or music BooleanButton sfxButton = new BooleanButton("Sound Effects", true); sfxButton.Tapped += sfxButton_Tapped; MenuButtons.Add(sfxButton); BooleanButton musicButton = new BooleanButton("Music", true); musicButton.Tapped += musicButton_Tapped; MenuButtons.Add(musicButton); }