Feldzugkarte, Reise in 3D, Kampfstile der Gegner, Missio, inszenierte Heimkehr

Stand von main 8c62f0dd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 16:13:28 +01:00
parent 35a5ac5032
commit 9c433c61ba
33 changed files with 1265 additions and 131 deletions

View File

@@ -72,6 +72,19 @@ namespace GladiatorIdle.Gfx
if (line.Length > 0 && y <= r.Bottom + lineH) Text(sb, fs, px, line, new Vector2(r.X, y), c);
}
/// Zeilen, die TextWrap für diesen Text in dieser Breite braucht.
public static int WrapLines(FontSystem fs, float px, string text, float width)
{
int lines = 1; string line = "";
foreach (var word in text.Split(' '))
{
string next = line.Length == 0 ? word : line + " " + word;
if (line.Length > 0 && Measure(fs, px, next).X > width) { lines++; line = word; }
else line = next;
}
return lines;
}
/// Balken mit verzögertem Rest (weißer Abschnitt zeigt den gerade verlorenen Teil).
public static void Bar(SpriteBatch sb, RectangleF r, float value, float lag, Color c, bool fromRight = false)
{