Beispiel #1
0
        public override void Draw(SpriteBatch batch)
        {
            MenuMap.Draw(batch);

            var textOffset = new Vector2(10, 10);

            var i = 1;

            batch.Begin();
            {
                batch.Draw(Game.SideBar);
                foreach (var p in Players)
                {
                    var str = Fonts.GameFont.MeasureString($"{Ordinal(i)} {p.Name}");
                    textOffset = new Vector2(Game.Center.X - (str.X / 2f), textOffset.Y);
                    batch.DrawString(Fonts.GameFont, $"{Ordinal(i)} {p.Name}", textOffset + new Vector2(2f, 3f), Color.Black * 0.25f);
                    batch.DrawString(Fonts.GameFont, $"{Ordinal(i)} {p.Name}", textOffset, Color.White);
                    str        = Fonts.GameFontGrey.MeasureString($"{p.Total}");
                    textOffset = new Vector2(Game.Center.X - (str.X / 2f), textOffset.Y + str.Y + 15);
                    batch.DrawString(Fonts.GameFontGrey, $"{p.Total}", textOffset + new Vector2(2f, 3f), Color.Black * 0.25f);
                    batch.DrawString(Fonts.GameFontGrey, $"{p.Total}", textOffset, p.Color);
                    textOffset = new Vector2(0, textOffset.Y + Fonts.GameFontGrey.MeasureString($"{p.Total}").Y + 30);
                    i++;
                }

                var exitStr = Fonts.GameFont.MeasureString(Strings.Exit);
                batch.DrawString(Fonts.GameFont, Strings.Exit,
                                 new Vector2(Game.Width - (exitStr.X + 10) + 2f, Game.Height - (exitStr.Y + 10) + 3f), Color.Black * 0.25f);
                batch.DrawString(Fonts.GameFont, Strings.Exit,
                                 new Vector2(Game.Width - (exitStr.X + 10), Game.Height - (exitStr.Y + 10)), Color.White);
            }
            batch.End();
            base.Draw(batch);
        }
 public override void Draw(SpriteBatch batch)
 {
     MenuMap.Draw(batch);
     batch.Begin();
     batch.Draw(Game.SideBar);
     batch.End();
     _menu.Draw();
     MapChooser.Draw();
 }
Beispiel #3
0
        public override void Draw(SpriteBatch batch)
        {
            MenuMap.Draw(batch);

            //   Game.Clouds.Draw(batch);

            batch.Begin();
            batch.Draw(Game.Logo);
            batch.Draw(Game.SideBar);
            _menu.Draw();
            batch.End();
        }