mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-13 08:33:10 -07:00
Spot fix so autosave dropdown will save immediately (#2568)
This commit is contained in:
parent
e07de4b3b5
commit
0d54cb15df
1 changed files with 2 additions and 11 deletions
|
@ -834,18 +834,9 @@ namespace GameMenuBar {
|
||||||
UIWidgets::PaddedSeparator(false, true);
|
UIWidgets::PaddedSeparator(false, true);
|
||||||
|
|
||||||
// Autosave enum value of 1 is the default in presets and the old checkbox "on" state for backwards compatibility
|
// Autosave enum value of 1 is the default in presets and the old checkbox "on" state for backwards compatibility
|
||||||
const uint16_t selectedAutosaveId = CVarGetInteger("gAutosave", 0);
|
|
||||||
std::string autosaveLabels[] = { "Off", "New Location + Major Item", "New Location + Any Item", "New Location", "Major Item", "Any Item" };
|
|
||||||
UIWidgets::PaddedText("Autosave", false, true);
|
UIWidgets::PaddedText("Autosave", false, true);
|
||||||
if (ImGui::BeginCombo("##AutosaveComboBox", autosaveLabels[selectedAutosaveId].c_str())) {
|
const char* autosaveLabels[] = { "Off", "New Location + Major Item", "New Location + Any Item", "New Location", "Major Item", "Any Item" };
|
||||||
for (int index = 0; index < sizeof(autosaveLabels) / sizeof(autosaveLabels[0]); index++) {
|
UIWidgets::EnhancementCombobox("gAutosave", autosaveLabels, (sizeof(autosaveLabels) / sizeof(autosaveLabels[0])), CVarGetInteger("gAutosave", 0));
|
||||||
if (ImGui::Selectable(autosaveLabels[index].c_str(), index == selectedAutosaveId)) {
|
|
||||||
CVarSetInteger("gAutosave", index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndCombo();
|
|
||||||
}
|
|
||||||
UIWidgets::Tooltip("Automatically save the game every time a new area is entered and/or item is obtained\n"
|
UIWidgets::Tooltip("Automatically save the game every time a new area is entered and/or item is obtained\n"
|
||||||
"Major items exclude rupees and health/magic/ammo refills (but include bombchus unless bombchu drops are enabled)");
|
"Major items exclude rupees and health/magic/ammo refills (but include bombchus unless bombchu drops are enabled)");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue