mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
refactor: replace 8 more inline color literals with existing constants
Replace kYellow (5), kRed (2), kGray (1), kLightGray (1) inline ImVec4 literals in realm_screen, spellbook_screen, talent_screen, game_screen, and inventory_screen.
This commit is contained in:
parent
4090041431
commit
ee20f823f7
5 changed files with 9 additions and 9 deletions
|
|
@ -5254,7 +5254,7 @@ void GameScreen::renderFocusFrame(game::GameHandler& gameHandler) {
|
|||
int fRank = gameHandler.getCreatureRank(focusUnit->getEntry());
|
||||
if (fRank == 1) { ImGui::SameLine(0,4); ImGui::TextColored(ImVec4(1.0f,0.8f,0.2f,1.0f), "[Elite]"); }
|
||||
else if (fRank == 2) { ImGui::SameLine(0,4); ImGui::TextColored(ImVec4(0.8f,0.4f,1.0f,1.0f), "[Rare Elite]"); }
|
||||
else if (fRank == 3) { ImGui::SameLine(0,4); ImGui::TextColored(ImVec4(1.0f,0.3f,0.3f,1.0f), "[Boss]"); }
|
||||
else if (fRank == 3) { ImGui::SameLine(0,4); ImGui::TextColored(colors::kRed, "[Boss]"); }
|
||||
else if (fRank == 4) { ImGui::SameLine(0,4); ImGui::TextColored(ImVec4(0.5f,0.9f,1.0f,1.0f), "[Rare]"); }
|
||||
|
||||
// Creature type
|
||||
|
|
|
|||
|
|
@ -3666,8 +3666,8 @@ void InventoryScreen::renderItemTooltip(const game::ItemQueryResponseData& info,
|
|||
float diff = nv - ev;
|
||||
char buf[96];
|
||||
if (diff > 0.0f) { std::snprintf(buf, sizeof(buf), "%s: %.0f (▲%.0f)", label, nv, diff); ImGui::TextColored(ImVec4(0.0f,1.0f,0.0f,1.0f), "%s", buf); }
|
||||
else if (diff < 0.0f) { std::snprintf(buf, sizeof(buf), "%s: %.0f (▼%.0f)", label, nv, -diff); ImGui::TextColored(ImVec4(1.0f,0.3f,0.3f,1.0f), "%s", buf); }
|
||||
else { std::snprintf(buf, sizeof(buf), "%s: %.0f (=)", label, nv); ImGui::TextColored(ImVec4(0.7f,0.7f,0.7f,1.0f), "%s", buf); }
|
||||
else if (diff < 0.0f) { std::snprintf(buf, sizeof(buf), "%s: %.0f (▼%.0f)", label, nv, -diff); ImGui::TextColored(ui::colors::kRed, "%s", buf); }
|
||||
else { std::snprintf(buf, sizeof(buf), "%s: %.0f (=)", label, nv); ImGui::TextColored(ui::colors::kLightGray, "%s", buf); }
|
||||
};
|
||||
|
||||
float ilvlDiff = static_cast<float>(info.itemLevel) - static_cast<float>(eq->item.itemLevel);
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ ImVec4 RealmScreen::getPopulationColor(float population) const {
|
|||
if (population < 0.5f) {
|
||||
return ui::colors::kBrightGreen; // Green - Low
|
||||
} else if (population < 1.5f) {
|
||||
return ImVec4(1.0f, 1.0f, 0.3f, 1.0f); // Yellow - Medium
|
||||
return ui::colors::kYellow; // Yellow - Medium
|
||||
} else if (population < 2.5f) {
|
||||
return ImVec4(1.0f, 0.6f, 0.0f, 1.0f); // Orange - High
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -485,12 +485,12 @@ void SpellbookScreen::renderSpellTooltip(const SpellInfo* info, game::GameHandle
|
|||
ImGui::PushTextWrapPos(320.0f);
|
||||
|
||||
// Spell name in yellow
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "%s", info->name.c_str());
|
||||
ImGui::TextColored(ui::colors::kYellow, "%s", info->name.c_str());
|
||||
|
||||
// Rank in gray
|
||||
if (!info->rank.empty()) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "(%s)", info->rank.c_str());
|
||||
ImGui::TextColored(ui::colors::kGray, "(%s)", info->rank.c_str());
|
||||
}
|
||||
|
||||
// Passive indicator
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ void TalentScreen::renderTalentTrees(game::GameHandler& gameHandler) {
|
|||
}
|
||||
if (ImGui::BeginPopupModal("Learn Talent?##talent_confirm", nullptr,
|
||||
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove)) {
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "%s", pendingTalentName_.c_str());
|
||||
ImGui::TextColored(ui::colors::kYellow, "%s", pendingTalentName_.c_str());
|
||||
ImGui::Text("Rank %u", pendingTalentRank_ + 1);
|
||||
ImGui::Spacing();
|
||||
ImGui::TextWrapped("Spend a talent point?");
|
||||
|
|
@ -524,9 +524,9 @@ void TalentScreen::renderTalent(game::GameHandler& gameHandler,
|
|||
// Spell name
|
||||
const std::string& spellName = gameHandler.getSpellName(spellId);
|
||||
if (!spellName.empty()) {
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "%s", spellName.c_str());
|
||||
ImGui::TextColored(ui::colors::kYellow, "%s", spellName.c_str());
|
||||
} else {
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.3f, 1.0f), "Talent #%u", talent.talentId);
|
||||
ImGui::TextColored(ui::colors::kYellow, "Talent #%u", talent.talentId);
|
||||
}
|
||||
|
||||
// Rank display
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue