[Localization] Fixing the German stats page (#3410)

* Readding the german stats changes

* Shadow
This commit is contained in:
Jannik Tappert 2024-08-07 20:53:51 +02:00 committed by GitHub
parent 2b99f005dc
commit 78a829579f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 1 deletions

View File

@ -107,6 +107,7 @@ export function addTextInputObject(scene: Phaser.Scene, x: number, y: number, wi
}
export function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): TextStyleOptions {
const lang = i18next.resolvedLanguage;
let shadowXpos = 4;
let shadowYpos = 5;
let scale = 0.1666666667;
@ -137,11 +138,37 @@ export function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraSty
case TextStyle.SUMMARY_GREEN:
case TextStyle.WINDOW:
case TextStyle.WINDOW_ALT:
case TextStyle.STATS_VALUE:
shadowXpos = 3;
shadowYpos = 3;
break;
case TextStyle.STATS_LABEL:
let fontSizeLabel = "96px";
switch (lang) {
case "de":
shadowXpos = 3;
shadowYpos = 3;
fontSizeLabel = "80px";
break;
default:
fontSizeLabel = "96px";
break;
}
styleOptions.fontSize = fontSizeLabel;
break;
case TextStyle.STATS_VALUE:
shadowXpos = 3;
shadowYpos = 3;
let fontSizeValue = "96px";
switch (lang) {
case "de":
fontSizeValue = "80px";
break;
default:
fontSizeValue = "96px";
break;
}
styleOptions.fontSize = fontSizeValue;
break;
case TextStyle.MESSAGE:
case TextStyle.SETTINGS_LABEL:
case TextStyle.SETTINGS_LOCKED: