feat: add round display

This commit is contained in:
2026-02-04 20:01:36 +08:00
parent ac58e1bfb7
commit 7db7697625
18 changed files with 71 additions and 26 deletions

View File

@@ -9,5 +9,6 @@ struct DebugData {
std::pair<int, int> mousePosition = {0, 0};
std::pair<int, int> mouseLogicalPostion = {0, 0};
int currentFPS = 0;
int round = 0;
};

View File

@@ -34,6 +34,14 @@ void DebugOverlay::initialize() {
80
);
m_labels.emplace(mouseLogicalPos->getNameHash(), std::move(mouseLogicalPos));
auto roundLabel = UIWidgetFactory::createStandardLabel(
"RoundLabel",
"Round: 0",
0,
120
);
m_labels.emplace(roundLabel->getNameHash(), std::move(roundLabel));
}
@@ -125,4 +133,12 @@ void DebugOverlay::updateDebugInfo() {
} else {
std::cerr << "Mouse LogicalPosition Label not found!\n";
}
const auto roundLabelKey = makeHash("RoundLabel");
auto roundLabel = m_labels.find(roundLabelKey);
if (roundLabel != m_labels.end()) {
roundLabel->second->setText("Round: " + std::to_string(m_debugData.round));
} else {
std::cerr << "Round Label not found!\n";
}
}