mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
feat: add PieceInfo display
This commit is contained in:
@@ -21,6 +21,7 @@ public:
|
||||
label->setText(text, {"SourceHanSansSC-Regular.otf", UI::UI_NORMAL_FONT_SIZE, {0, 0, 0, 255}});
|
||||
label->setName(name);
|
||||
label->setVisible(true);
|
||||
label->setBackgroundColor({0, 0, 0, 0});
|
||||
return label;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,15 @@ void GameUIManager::setupUIComponents() {
|
||||
);
|
||||
m_labels.emplace(playerLabel->getNameHash(), std::move(playerLabel));
|
||||
|
||||
auto pieceInfoLabel = UIWidgetFactory::createStandardLabel(
|
||||
"PieceInfoLabel",
|
||||
"HP: 0\nATK: 0",
|
||||
120,
|
||||
0
|
||||
);
|
||||
pieceInfoLabel->setVisible(false);
|
||||
m_labels.emplace(pieceInfoLabel->getNameHash(), std::move(pieceInfoLabel));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user