Switched UI Label to use localized strings.

This commit is contained in:
2022-12-16 08:45:14 -08:00
parent b17592f4fd
commit 71dbf6e646
10 changed files with 70 additions and 43 deletions

View File

@ -41,9 +41,9 @@ namespace Dawn {
);
start
->then(new VisualNovelTextboxEvent(vnManager, "Starting Game"))
->then(new VisualNovelTextboxEvent(vnManager, "test"))
->then(new PokerNewGameEvent(vnManager))
->then(new VisualNovelTextboxEvent(vnManager, "Game Started"))
->then(new VisualNovelTextboxEvent(vnManager, "test"))
->then(new PokerInitialEvent(vnManager))
;

View File

@ -37,7 +37,7 @@ PokerPlayerDisplay::PokerPlayerDisplay(UICanvas *canvas) :
// Player Name
this->borderInner.addChild(&this->labelName);
this->labelName.setText("Player Name");
this->labelName.setText("undefined");
this->labelName.setFont(&this->font->font);
this->labelName.setFontSize(40);
this->labelName.setTransform(
@ -69,7 +69,7 @@ void PokerPlayerDisplay::setPlayer(PokerPlayer *player) {
player->eventChipsChanged.addListener(this, &PokerPlayerDisplay::onPlayerChipsChanged);
this->labelName.setText("Name");
this->labelName.setText("undefined");
this->animChips.clear();
this->animChips.restart();
this->animChipsValue = player->chips;
@ -80,11 +80,11 @@ void PokerPlayerDisplay::setPlayer(PokerPlayer *player) {
void PokerPlayerDisplay::onSceneUpdate() {
this->animChips.tick(getGame()->timeManager.delta);
std::stringstream stream;
stream.precision(0);
stream << "$";
stream << this->animChipsValue;
this->labelChips.setText(stream.str());
// std::stringstream stream;
// stream.precision(0);
// stream << "$";
// stream << this->animChipsValue;
this->labelChips.setText("undefined");
}
void PokerPlayerDisplay::onPlayerChipsChanged() {