ui: improve the display of PieceInfo

This commit is contained in:
2026-02-05 11:20:09 +08:00
parent dd8b57c306
commit b10dc25457
2 changed files with 4 additions and 1 deletions

View File

@@ -171,7 +171,7 @@ void GameScene::updatePieceInfo() {
m_gameUIManager->setLabel("PieceInfoLabel", true); m_gameUIManager->setLabel("PieceInfoLabel", true);
m_gameUIManager->setLabel("PieceInfoLabel", text); m_gameUIManager->setLabel("PieceInfoLabel", text);
m_gameUIManager->setLabel("PieceInfoLabel", mouseX, mouseY); m_gameUIManager->setLabel("PieceInfoLabel", mouseX + 5, mouseY + 5);

View File

@@ -184,8 +184,11 @@ void GameUIManager::setupUIComponents() {
0 0
); );
pieceInfoLabel->setVisible(false); pieceInfoLabel->setVisible(false);
pieceInfoLabel->setBackgroundColor({255, 180, 190, 230});
pieceInfoLabel->setRect(120, 0, UI::ButtonSize * 4, UI::ButtonSize * 3);
m_labels.emplace(pieceInfoLabel->getNameHash(), std::move(pieceInfoLabel)); m_labels.emplace(pieceInfoLabel->getNameHash(), std::move(pieceInfoLabel));
} }