Skip to content

Commit

Permalink
Update Options Tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Caladius committed Oct 20, 2024
1 parent 6f50efb commit ace4d91
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions soh/soh/Enhancements/timesplits/TimeSplits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,13 +729,6 @@ void TimeSplitsDrawOptionsMenu() {
}

ImGui::SeparatorText("Split List Management");
if (ImGui::Button("New Attempt")) {
for (auto& data : splitList) {
data.splitTimeStatus = SPLIT_INACTIVE;
}
splitList[0].splitTimeStatus = SPLIT_ACTIVE;
}
UIWidgets::PaddedSeparator();

ImGui::Text("New List Name: ");
ImGui::PushItemWidth(150.0f);
Expand All @@ -746,7 +739,7 @@ void TimeSplitsDrawOptionsMenu() {
TimeSplitsFileManagement(ACTION_SAVE, listNameBuf, splitList);
}
UIWidgets::PaddedSeparator();

TimeSplitsFileManagement(ACTION_COLLECT, "", emptyList);
static uint32_t selectedItem = 0;
static std::string listItem = keys[0];
Expand All @@ -770,14 +763,21 @@ void TimeSplitsDrawOptionsMenu() {
if (ImGui::Button("Load List")) {
TimeSplitsFileManagement(ACTION_LOAD, keys[selectedItem].c_str(), emptyList);
}
ImGui::SameLine();
if (ImGui::Button("Save List")) {
TimeSplitsFileManagement(ACTION_SAVE, keys[selectedItem].c_str(), splitList);
}
UIWidgets::PaddedSeparator();

if (ImGui::Button("Update Splits")) {
TimeSplitsFileManagement(ACTION_UPDATE, keys[selectedItem].c_str(), splitList);
if (ImGui::Button("New Attempt")) {
for (auto& data : splitList) {
data.splitTimeStatus = SPLIT_INACTIVE;
}
splitList[0].splitTimeStatus = SPLIT_ACTIVE;
}
ImGui::SameLine();
if (ImGui::Button("Save List")) {
TimeSplitsFileManagement(ACTION_SAVE, keys[selectedItem].c_str(), splitList);
if (ImGui::Button("Update Splits")) {
TimeSplitsFileManagement(ACTION_UPDATE, keys[selectedItem].c_str(), splitList);
}
}

Expand Down

0 comments on commit ace4d91

Please sign in to comment.