Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions soh/soh/SohGui/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,18 +650,15 @@ void Menu::DrawElement() {
ImVec2 pos = window->DC.CursorPos;
float centerX = pos.x + windowWidth / 2 - (style.ItemSpacing.x * (menuEntries.size() + 1));
std::vector<ImVec2> headerSizes;
float headerWidth = style.ItemSpacing.x + 20;
float headerWidth = 0.0f;
bool headerSearch = !CVarGetInteger(CVAR_SETTING("Menu.SidebarSearch"), 0);
if (headerSearch) {
headerWidth += 200.0f + style.ItemSpacing.x + style.FramePadding.x;
headerWidth += 200.0f;
}
for (auto& label : menuOrder) {
ImVec2 size = ImGui::CalcTextSize(label.c_str());
headerSizes.push_back(size);
headerWidth += size.x + style.FramePadding.x * 2;
if (label == headerIndex) {
headerWidth += style.ItemSpacing.x;
}
headerWidth += size.x + style.FramePadding.x * 2 + style.ItemSpacing.x;
}

// Full screen menu with widths below 1280, heights below 800.
Expand Down
Loading