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:");
|
ImGui::Text("Dungeon:");
|
||||||
|
|
||||||
struct DungeonEntry { uint32_t id; const char* name; };
|
struct DungeonEntry { uint32_t id; const char* name; };
|
||||||
static const DungeonEntry kDungeons[] = {
|
// Category 0=Random, 1=Classic, 2=TBC, 3=WotLK
|
||||||
{ 861, "Random Dungeon" },
|
struct DungeonEntryEx { uint32_t id; const char* name; uint8_t cat; };
|
||||||
{ 862, "Random Heroic" },
|
static const DungeonEntryEx kDungeons[] = {
|
||||||
// Vanilla classics
|
{ 861, "Random Dungeon", 0 },
|
||||||
{ 36, "Deadmines" },
|
{ 862, "Random Heroic", 0 },
|
||||||
{ 43, "Ragefire Chasm" },
|
{ 36, "Deadmines", 1 },
|
||||||
{ 47, "Razorfen Kraul" },
|
{ 43, "Ragefire Chasm", 1 },
|
||||||
{ 48, "Blackfathom Deeps" },
|
{ 47, "Razorfen Kraul", 1 },
|
||||||
{ 52, "Uldaman" },
|
{ 48, "Blackfathom Deeps", 1 },
|
||||||
{ 57, "Dire Maul: East" },
|
{ 52, "Uldaman", 1 },
|
||||||
{ 70, "Onyxia's Lair" },
|
{ 57, "Dire Maul: East", 1 },
|
||||||
// TBC heroics
|
{ 70, "Onyxia's Lair", 1 },
|
||||||
{ 264, "The Blood Furnace" },
|
{ 264, "The Blood Furnace", 2 },
|
||||||
{ 269, "The Shattered Halls" },
|
{ 269, "The Shattered Halls", 2 },
|
||||||
// WotLK normals/heroics
|
{ 576, "The Nexus", 3 },
|
||||||
{ 576, "The Nexus" },
|
{ 578, "The Oculus", 3 },
|
||||||
{ 578, "The Oculus" },
|
{ 595, "The Culling of Stratholme", 3 },
|
||||||
{ 595, "The Culling of Stratholme" },
|
{ 599, "Halls of Stone", 3 },
|
||||||
{ 599, "Halls of Stone" },
|
{ 600, "Drak'Tharon Keep", 3 },
|
||||||
{ 600, "Drak'Tharon Keep" },
|
{ 601, "Azjol-Nerub", 3 },
|
||||||
{ 601, "Azjol-Nerub" },
|
{ 604, "Gundrak", 3 },
|
||||||
{ 604, "Gundrak" },
|
{ 608, "Violet Hold", 3 },
|
||||||
{ 608, "Violet Hold" },
|
{ 619, "Ahn'kahet: Old Kingdom", 3 },
|
||||||
{ 619, "Ahn'kahet: Old Kingdom" },
|
{ 623, "Halls of Lightning", 3 },
|
||||||
{ 623, "Halls of Lightning" },
|
{ 632, "The Forge of Souls", 3 },
|
||||||
{ 632, "The Forge of Souls" },
|
{ 650, "Trial of the Champion", 3 },
|
||||||
{ 650, "Trial of the Champion" },
|
{ 658, "Pit of Saron", 3 },
|
||||||
{ 658, "Pit of Saron" },
|
{ 668, "Halls of Reflection", 3 },
|
||||||
{ 668, "Halls of Reflection" },
|
|
||||||
};
|
};
|
||||||
|
static const char* kCatHeaders[] = { nullptr, "-- Classic --", "-- TBC --", "-- WotLK --" };
|
||||||
|
|
||||||
// Find current index
|
// Find current index
|
||||||
int curIdx = 0;
|
int curIdx = 0;
|
||||||
|
|
@ -23261,7 +23261,15 @@ void GameScreen::renderDungeonFinderWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
ImGui::SetNextItemWidth(-1);
|
ImGui::SetNextItemWidth(-1);
|
||||||
if (ImGui::BeginCombo("##dungeon", kDungeons[curIdx].name)) {
|
if (ImGui::BeginCombo("##dungeon", kDungeons[curIdx].name)) {
|
||||||
|
uint8_t lastCat = 255;
|
||||||
for (int i = 0; i < (int)(sizeof(kDungeons)/sizeof(kDungeons[0])); ++i) {
|
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_);
|
bool selected = (kDungeons[i].id == lfgSelectedDungeon_);
|
||||||
if (ImGui::Selectable(kDungeons[i].name, selected))
|
if (ImGui::Selectable(kDungeons[i].name, selected))
|
||||||
lfgSelectedDungeon_ = kDungeons[i].id;
|
lfgSelectedDungeon_ = kDungeons[i].id;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue