Switched UI Label to use localized strings.
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user