Esempio n. 1
0
 public Font(Game game, 
             SpriteBatch spriteBatch, 
             FontDescription fontDescription)
     : base(game)
 {
     this.spriteBatch = spriteBatch;
     this.fontDescription = fontDescription;
 }
Esempio n. 2
0
 public StartScreen(Game game, SpriteBatch spriteBatch, Action<ScreenManager.GameScreen> navigateToScreen)
     : base(game, spriteBatch, navigateToScreen)
 {
     ScreenGameComponents.Add(new NonAnimatedSprite(game, "Images/Background/titleLetters", DrawablePosition.TopCentered, spriteBatch));
     // Font for the start button
     FontDescription startFontDescription = new FontDescription(
                 "Fonts/TitleFont",
                 "Start!",
                 Color.Red,
                 Vector2.Zero);
     Button startButton = new Button(game, spriteBatch,
                                     new ButtonDescription(startFontDescription, DrawablePosition.BottomCentered,
                                                           new Vector2(200, 100)));
     startButton.ButtonClicked = StartButtonWasClicked;
     ScreenGameComponents.Add(startButton);
 }
Esempio n. 3
0
 public ButtonDescription(FontDescription fontDescription, DrawablePosition fixedPosition, Vector2 size)
 {
     FontDescription = fontDescription;
     FixedPosition = fixedPosition;
     Size = size;
 }
Esempio n. 4
0
 public ButtonDescription(FontDescription fontDescription, Vector2 position, Vector2 size)
 {
     FontDescription = fontDescription;
     Position = position;
     Size = size;
 }