Skip to content

Commit

Permalink
Allow Split Table to resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Caladius committed Oct 20, 2024
1 parent 8ba2b44 commit b869371
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions soh/soh/Enhancements/timesplits/TimeSplits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ void TimeSplitsDrawSplitsList() {
ImGui::BeginTable("Splits", 5, ImGuiTableFlags_Hideable | ImGuiTableFlags_Reorderable);
ImGui::TableSetupColumn("Item Image", ImGuiTableColumnFlags_WidthFixed | ImGuiTableColumnFlags_NoHeaderLabel, 34.0f);
ImGui::TableSetupColumn("Item Name");
ImGui::TableSetupColumn("Current Time", ImGuiTableColumnFlags_WidthFixed, 90.0f);
ImGui::TableSetupColumn("+/-", ImGuiTableColumnFlags_WidthFixed, 80.0f);
ImGui::TableSetupColumn("Prev. Best", ImGuiTableColumnFlags_WidthFixed, 90.0f);
ImGui::TableSetupColumn("Current Time");
ImGui::TableSetupColumn("+/-");
ImGui::TableSetupColumn("Prev. Best");
ImGui::TableHeadersRow();

ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1.0f, 1.0f, 1.0f, 0.0f));
Expand Down Expand Up @@ -880,24 +880,23 @@ void TimeSplitWindow::DrawElement() {
InitializeSplitDataFile();
initialized = true;
}

ImGui::PushStyleColor(ImGuiCol_WindowBg, windowColor);
ImGui::BeginTabBar("Split Tabs");
if (ImGui::BeginTabItem("Splits")) {
TimeSplitsDrawSplitsList();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Manage List")) {
TimeSplitsDrawManageList();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Options")) {
TimeSplitsDrawOptionsMenu();
ImGui::EndTabItem();
if (ImGui::BeginTabBar("Split Tabs")) {
if (ImGui::BeginTabItem("Splits")) {
TimeSplitsDrawSplitsList();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Manage List")) {
TimeSplitsDrawManageList();
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Options")) {
TimeSplitsDrawOptionsMenu();
ImGui::EndTabItem();
}
ImGui::EndTabBar();
}
ImGui::EndTabBar();
ImGui::PopStyleColor(1);

ImGui::PopStyleColor();
}

void TimeSplitWindow::InitElement() {
Expand Down

0 comments on commit b869371

Please sign in to comment.