From dfbbe47f2631c51b01ca5133ef9e2e467806d511 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 19 Mar 2024 23:39:43 -0400 Subject: [PATCH] Add missing information on summary screen --- src/ui/summary-ui-handler.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 42a3cbdd6a6..a54d8e89221 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -7,13 +7,15 @@ import { Type, getTypeRgb } from "../data/type"; import { TextStyle, addBBCodeTextObject, addTextObject, getBBCodeFrag, getTextColor } from "./text"; import Move, { MoveCategory } from "../data/move"; import { getPokeballAtlasKey } from "../data/pokeball"; -import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; +import { getGenderColor, getGenderSymbol } from "../data/gender"; import { getLevelTotalExp } from "../data/exp"; import { Stat, getStatName } from "../data/pokemon-stat"; import { PokemonHeldItemModifier } from "../modifier/modifier"; import { StatusEffect } from "../data/status-effect"; import { getBiomeName } from "../data/biomes"; import { Nature, getNatureStatMultiplier } from "../data/nature"; +import { loggedInUser } from "../account"; +import { PlayerGender } from "../system/game-data"; enum Page { PROFILE, @@ -500,6 +502,19 @@ export default class SummaryUiHandler extends UiHandler { const profileContainer = this.scene.add.container(0, -pageBg.height); pageContainer.add(profileContainer); + const trainerLabel = addTextObject(this.scene, 7, 12, 'OT/', TextStyle.SUMMARY); + trainerLabel.setOrigin(0, 0); + profileContainer.add(trainerLabel); + + const trainerText = addTextObject(this.scene, 25, 12, loggedInUser?.username || 'Unknown', + this.scene.gameData.gender === PlayerGender.FEMALE ? TextStyle.SUMMARY_PINK : TextStyle.SUMMARY_BLUE); + trainerText.setOrigin(0, 0); + profileContainer.add(trainerText); + + const trainerIdText = addTextObject(this.scene, 174, 12, this.scene.gameData.trainerId.toString(), TextStyle.SUMMARY); + trainerIdText.setOrigin(0, 0); + profileContainer.add(trainerIdText); + const typeLabel = addTextObject(this.scene, 7, 28, 'Type/', TextStyle.WINDOW); typeLabel.setOrigin(0, 0); profileContainer.add(typeLabel);