Start to work on dual input for P1

This commit is contained in:
2021-08-29 19:54:18 +02:00
parent 4de3d69bb8
commit 02b528ea8c
12 changed files with 110 additions and 48 deletions

View File

@@ -98,6 +98,7 @@ void Text::writeDX(Uint8 flags, int x, int y, std::string text, int kerning, col
const bool centered = ((flags & TXT_CENTER) == TXT_CENTER);
const bool shadowed = ((flags & TXT_SHADOW) == TXT_SHADOW);
const bool colored = ((flags & TXT_COLOR) == TXT_COLOR);
const bool stroked = ((flags & TXT_STROKE) == TXT_STROKE);
if (centered)
x -= (Text::lenght(text, kerning) / 2);
@@ -105,6 +106,19 @@ void Text::writeDX(Uint8 flags, int x, int y, std::string text, int kerning, col
if (shadowed)
writeColored(x + shadowDistance, y + shadowDistance, text, shadowColor, kerning, lenght);
if (stroked)
{
writeColored(x + shadowDistance, y + shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x - shadowDistance, y + shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x + shadowDistance, y - shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x - shadowDistance, y - shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x, y + shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x, y - shadowDistance, text, shadowColor, kerning, lenght);
writeColored(x + shadowDistance, y, text, shadowColor, kerning, lenght);
writeColored(x - shadowDistance, y, text, shadowColor, kerning, lenght);
}
if (colored)
writeColored(x, y, text, textColor, kerning, lenght);
else