Change default index retrieval to sidebarOrder vectors. (#5189)

This commit is contained in:
Malkierian 2025-03-23 09:42:34 -07:00 committed by GitHub
parent 9ffe2ab2b9
commit 2564721b2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -727,7 +727,7 @@ void Menu::DrawElement() {
std::string sectionIndex = CVarGetString(sidebarCvar, ""); std::string sectionIndex = CVarGetString(sidebarCvar, "");
if (!sidebar->contains(sectionIndex)) { if (!sidebar->contains(sectionIndex)) {
sectionIndex = sidebar->begin()->first; sectionIndex = menuEntries.at(headerIndex).sidebarOrder.at(0);
} }
float sectionCenterX = pos.x + (sidebarWidth / 2); float sectionCenterX = pos.x + (sidebarWidth / 2);
float topY = pos.y; float topY = pos.y;