mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: group dungeon finder list by expansion with separator headers
Some checks failed
Build / Build (arm64) (push) Has been cancelled
Build / Build (x86-64) (push) Has been cancelled
Build / Build (macOS arm64) (push) Has been cancelled
Build / Build (windows-arm64) (push) Has been cancelled
Build / Build (windows-x86-64) (push) Has been cancelled
Security / CodeQL (C/C++) (push) Has been cancelled
Security / Semgrep (push) Has been cancelled
Security / Sanitizer Build (ASan/UBSan) (push) Has been cancelled
Some checks failed
Build / Build (arm64) (push) Has been cancelled
Build / Build (x86-64) (push) Has been cancelled
Build / Build (macOS arm64) (push) Has been cancelled
Build / Build (windows-arm64) (push) Has been cancelled
Build / Build (windows-x86-64) (push) Has been cancelled
Security / CodeQL (C/C++) (push) Has been cancelled
Security / Semgrep (push) Has been cancelled
Security / Sanitizer Build (ASan/UBSan) (push) Has been cancelled
Categorize dungeons into Random/Classic/TBC/WotLK sections with visual separators in the dropdown for easier navigation.
This commit is contained in:
parent
86cc6e16a4
commit
0b8e1834f6
1 changed files with 37 additions and 29 deletions
|
|
@ -23222,36 +23222,36 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
|||
ImGui::Text("Dungeon:");
|
||||
|
||||
struct DungeonEntry { uint32_t id; const char* name; };
|
||||
static const DungeonEntry kDungeons[] = {
|
||||
{ 861, "Random Dungeon" },
|
||||
{ 862, "Random Heroic" },
|
||||
// Vanilla classics
|
||||
{ 36, "Deadmines" },
|
||||
{ 43, "Ragefire Chasm" },
|
||||
{ 47, "Razorfen Kraul" },
|
||||
{ 48, "Blackfathom Deeps" },
|
||||
{ 52, "Uldaman" },
|
||||
{ 57, "Dire Maul: East" },
|
||||
{ 70, "Onyxia's Lair" },
|
||||
// TBC heroics
|
||||
{ 264, "The Blood Furnace" },
|
||||
{ 269, "The Shattered Halls" },
|
||||
// WotLK normals/heroics
|
||||
{ 576, "The Nexus" },
|
||||
{ 578, "The Oculus" },
|
||||
{ 595, "The Culling of Stratholme" },
|
||||
{ 599, "Halls of Stone" },
|
||||
{ 600, "Drak'Tharon Keep" },
|
||||
{ 601, "Azjol-Nerub" },
|
||||
{ 604, "Gundrak" },
|
||||
{ 608, "Violet Hold" },
|
||||
{ 619, "Ahn'kahet: Old Kingdom" },
|
||||
{ 623, "Halls of Lightning" },
|
||||
{ 632, "The Forge of Souls" },
|
||||
{ 650, "Trial of the Champion" },
|
||||
{ 658, "Pit of Saron" },
|
||||
{ 668, "Halls of Reflection" },
|
||||
// Category 0=Random, 1=Classic, 2=TBC, 3=WotLK
|
||||
struct DungeonEntryEx { uint32_t id; const char* name; uint8_t cat; };
|
||||
static const DungeonEntryEx kDungeons[] = {
|
||||
{ 861, "Random Dungeon", 0 },
|
||||
{ 862, "Random Heroic", 0 },
|
||||
{ 36, "Deadmines", 1 },
|
||||
{ 43, "Ragefire Chasm", 1 },
|
||||
{ 47, "Razorfen Kraul", 1 },
|
||||
{ 48, "Blackfathom Deeps", 1 },
|
||||
{ 52, "Uldaman", 1 },
|
||||
{ 57, "Dire Maul: East", 1 },
|
||||
{ 70, "Onyxia's Lair", 1 },
|
||||
{ 264, "The Blood Furnace", 2 },
|
||||
{ 269, "The Shattered Halls", 2 },
|
||||
{ 576, "The Nexus", 3 },
|
||||
{ 578, "The Oculus", 3 },
|
||||
{ 595, "The Culling of Stratholme", 3 },
|
||||
{ 599, "Halls of Stone", 3 },
|
||||
{ 600, "Drak'Tharon Keep", 3 },
|
||||
{ 601, "Azjol-Nerub", 3 },
|
||||
{ 604, "Gundrak", 3 },
|
||||
{ 608, "Violet Hold", 3 },
|
||||
{ 619, "Ahn'kahet: Old Kingdom", 3 },
|
||||
{ 623, "Halls of Lightning", 3 },
|
||||
{ 632, "The Forge of Souls", 3 },
|
||||
{ 650, "Trial of the Champion", 3 },
|
||||
{ 658, "Pit of Saron", 3 },
|
||||
{ 668, "Halls of Reflection", 3 },
|
||||
};
|
||||
static const char* kCatHeaders[] = { nullptr, "-- Classic --", "-- TBC --", "-- WotLK --" };
|
||||
|
||||
// Find current index
|
||||
int curIdx = 0;
|
||||
|
|
@ -23261,7 +23261,15 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
|||
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
if (ImGui::BeginCombo("##dungeon", kDungeons[curIdx].name)) {
|
||||
uint8_t lastCat = 255;
|
||||
for (int i = 0; i < (int)(sizeof(kDungeons)/sizeof(kDungeons[0])); ++i) {
|
||||
if (kDungeons[i].cat != lastCat && kCatHeaders[kDungeons[i].cat]) {
|
||||
if (lastCat != 255) ImGui::Separator();
|
||||
ImGui::TextDisabled("%s", kCatHeaders[kDungeons[i].cat]);
|
||||
lastCat = kDungeons[i].cat;
|
||||
} else if (kDungeons[i].cat != lastCat) {
|
||||
lastCat = kDungeons[i].cat;
|
||||
}
|
||||
bool selected = (kDungeons[i].id == lfgSelectedDungeon_);
|
||||
if (ImGui::Selectable(kDungeons[i].name, selected))
|
||||
lfgSelectedDungeon_ = kDungeons[i].id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue