Improved the standardization of UI
This commit is contained in:
@ -12,12 +12,31 @@ PokerPlayerDisplay::PokerPlayerDisplay(UICanvas *canvas) :
|
||||
UIEmpty(canvas),
|
||||
labelName(canvas),
|
||||
labelChips(canvas),
|
||||
borderInner(canvas),
|
||||
border(canvas),
|
||||
animChips(&animChipsValue)
|
||||
{
|
||||
this->font = getGame()->assetManager.get<TrueTypeAsset>("truetype_ark");
|
||||
|
||||
// Border
|
||||
this->addChild(&this->border);
|
||||
PokerGameBorder::apply(&this->border);
|
||||
this->border.setTransform(
|
||||
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_STRETCH,
|
||||
glm::vec4(0, 0, 0, 0),
|
||||
-0.0f
|
||||
);
|
||||
|
||||
// Border Inner
|
||||
this->addChild(&this->borderInner);
|
||||
this->borderInner.setTransform(
|
||||
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_STRETCH,
|
||||
glm::vec4(this->border.getBorderSize(), this->border.getBorderSize()),
|
||||
0.0f
|
||||
);
|
||||
|
||||
// Player Name
|
||||
this->addChild(&this->labelName);
|
||||
this->borderInner.addChild(&this->labelName);
|
||||
this->labelName.setText("Player Name");
|
||||
this->labelName.setFont(&this->font->font);
|
||||
this->labelName.setFontSize(40);
|
||||
@ -28,7 +47,7 @@ PokerPlayerDisplay::PokerPlayerDisplay(UICanvas *canvas) :
|
||||
);
|
||||
|
||||
// Chips label
|
||||
this->addChild(&this->labelChips);
|
||||
this->borderInner.addChild(&this->labelChips);
|
||||
this->labelChips.setFont(&this->font->font);
|
||||
this->labelChips.setFontSize(40);
|
||||
this->labelChips.setTransform(
|
||||
|
Reference in New Issue
Block a user