public static void DrawText(string text, int x, int y) { DrawCntrl.CurrentFont = Font; string[] lines = text.Split(new[] { Environment.NewLine }, StringSplitOptions.None); var yAdd = 0; foreach (string line in lines) { DrawCntrl.DrawSprite(Sprites.Font, _fillerFrame, x * CharSize.X, (y + yAdd) * CharSize.Y, line.Length, 1, 0, BackgroundColor); DrawCntrl.CurrentColor = ForegroundColor; DrawCntrl.DrawText(line, x * CharSize.X, (y + yAdd) * CharSize.Y); yAdd += 1; } }
public override void DrawEnd() { var str = ""; if (!_dead) { str = Text.Substring(0, TextPtr + 1); } DrawSpeechBubble(_pos + BubbleOffset, _targetPos, _textSize); DrawCntrl.CurrentFont = _font; DrawCntrl.HorAlign = TextAlign.Center; DrawCntrl.VerAlign = TextAlign.Center; DrawCntrl.CurrentColor = Color.Black; DrawCntrl.DrawText(str, _pos + BubbleOffset); }
public override void DrawBegin() { if (_started) { CurrentScene.DrawTileMap(); } else { DrawCntrl.CurrentFont = Resources.Fonts.CartonSix; DrawCntrl.HorAlign = TextAlign.Center; DrawCntrl.VerAlign = TextAlign.Center; DrawCntrl.CurrentColor = Color.Black; DrawCntrl.DrawText( "oh no, someone stole my hands!" + Environment.NewLine + " " + Environment.NewLine + "by gn.fur, aristokrat952, brodux and cybereye" + Environment.NewLine + " " + Environment.NewLine + "monogame jam special" + Environment.NewLine + " " + Environment.NewLine + "press space", new Vector2(0, 0) ); } }