mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
feat: show craft queue count on cast bar during batch crafting
This commit is contained in:
parent
9aed192503
commit
f5297f9945
1 changed files with 9 additions and 4 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue