feat: show craft queue count on cast bar during batch crafting

This commit is contained in:
Kelsi 2026-03-17 10:30:18 -07:00
parent 9aed192503
commit f5297f9945

View file

@ -7877,16 +7877,21 @@ void GameScreen::renderCastBar(game::GameHandler& gameHandler) {
: ImVec4(0.8f, 0.6f, 0.2f, 1.0f); // gold for casts : ImVec4(0.8f, 0.6f, 0.2f, 1.0f); // gold for casts
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, barColor); ImGui::PushStyleColor(ImGuiCol_PlotHistogram, barColor);
char overlay[64]; char overlay[96];
if (currentSpellId == 0) { if (currentSpellId == 0) {
snprintf(overlay, sizeof(overlay), "Opening... (%.1fs)", gameHandler.getCastTimeRemaining()); snprintf(overlay, sizeof(overlay), "Opening... (%.1fs)", gameHandler.getCastTimeRemaining());
} else { } else {
const std::string& spellName = gameHandler.getSpellName(currentSpellId); const std::string& spellName = gameHandler.getSpellName(currentSpellId);
const char* verb = channeling ? "Channeling" : "Casting"; const char* verb = channeling ? "Channeling" : "Casting";
if (!spellName.empty()) int queueLeft = gameHandler.getCraftQueueRemaining();
snprintf(overlay, sizeof(overlay), "%s (%.1fs)", spellName.c_str(), gameHandler.getCastTimeRemaining()); if (!spellName.empty()) {
else if (queueLeft > 0)
snprintf(overlay, sizeof(overlay), "%s (%.1fs) [%d left]", spellName.c_str(), gameHandler.getCastTimeRemaining(), queueLeft);
else
snprintf(overlay, sizeof(overlay), "%s (%.1fs)", spellName.c_str(), gameHandler.getCastTimeRemaining());
} else {
snprintf(overlay, sizeof(overlay), "%s... (%.1fs)", verb, gameHandler.getCastTimeRemaining()); snprintf(overlay, sizeof(overlay), "%s... (%.1fs)", verb, gameHandler.getCastTimeRemaining());
}
} }
if (iconTex) { if (iconTex) {