mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
Comment out satellite preset pickers for now.
This commit is contained in:
parent
26437223c3
commit
5200bd9723
2 changed files with 43 additions and 42 deletions
|
@ -3651,47 +3651,47 @@ void RandomizerSettingsWindow::DrawElement() {
|
|||
bool disableEditingRandoSettings =
|
||||
CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0);
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) || disableEditingRandoSettings);
|
||||
const PresetTypeDefinition presetTypeDef = presetTypes.at(PRESET_TYPE_RANDOMIZER);
|
||||
std::string comboboxTooltip = "";
|
||||
for (auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter) {
|
||||
if (iter->first != 0)
|
||||
comboboxTooltip += "\n\n";
|
||||
comboboxTooltip += std::string(iter->second.label) + " - " + std::string(iter->second.description);
|
||||
}
|
||||
const std::string presetTypeCvar = CVAR_GENERAL("SelectedPresets.") + std::to_string(PRESET_TYPE_RANDOMIZER);
|
||||
randomizerPresetSelected = CVarGetInteger(presetTypeCvar.c_str(), RANDOMIZER_PRESET_DEFAULT);
|
||||
//const PresetTypeDefinition presetTypeDef = presetTypes.at(PRESET_TYPE_RANDOMIZER);
|
||||
//std::string comboboxTooltip = "";
|
||||
//for (auto iter = presetTypeDef.presets.begin(); iter != presetTypeDef.presets.end(); ++iter) {
|
||||
// if (iter->first != 0)
|
||||
// comboboxTooltip += "\n\n";
|
||||
// comboboxTooltip += std::string(iter->second.label) + " - " + std::string(iter->second.description);
|
||||
//}
|
||||
//const std::string presetTypeCvar = CVAR_GENERAL("SelectedPresets.") + std::to_string(PRESET_TYPE_RANDOMIZER);
|
||||
//randomizerPresetSelected = CVarGetInteger(presetTypeCvar.c_str(), RANDOMIZER_PRESET_DEFAULT);
|
||||
|
||||
if (UIWidgets::Combobox("Randomizer Presets", &randomizerPresetSelected, randomizerPresetList,
|
||||
UIWidgets::ComboboxOptions()
|
||||
.DefaultIndex(RANDOMIZER_PRESET_DEFAULT)
|
||||
.Tooltip(comboboxTooltip.c_str())
|
||||
.Color(THEME_COLOR))) {
|
||||
CVarSetInteger(presetTypeCvar.c_str(), randomizerPresetSelected);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 35.f);
|
||||
if (UIWidgets::Button(
|
||||
"Apply Preset##Randomizer",
|
||||
UIWidgets::ButtonOptions().Color(THEME_COLOR).Size(UIWidgets::Sizes::Inline).Padding(ImVec2(10.f, 6.f)))) {
|
||||
if (randomizerPresetSelected >= presetTypeDef.presets.size()) {
|
||||
randomizerPresetSelected = 0;
|
||||
}
|
||||
const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(randomizerPresetSelected);
|
||||
for (const char* block : presetTypeDef.blocksToClear) {
|
||||
CVarClearBlock(block);
|
||||
}
|
||||
if (randomizerPresetSelected != 0) {
|
||||
applyPreset(selectedPresetDef.entries);
|
||||
}
|
||||
CVarSetInteger(presetTypeCvar.c_str(), randomizerPresetSelected);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
mSettings->UpdateOptionProperties();
|
||||
// force excluded location list and trick list update if tab is open.
|
||||
locationsTabOpen = false;
|
||||
tricksTabOpen = false;
|
||||
}
|
||||
//if (UIWidgets::Combobox("Randomizer Presets", &randomizerPresetSelected, randomizerPresetList,
|
||||
// UIWidgets::ComboboxOptions()
|
||||
// .DefaultIndex(RANDOMIZER_PRESET_DEFAULT)
|
||||
// .Tooltip(comboboxTooltip.c_str())
|
||||
// .Color(THEME_COLOR))) {
|
||||
// CVarSetInteger(presetTypeCvar.c_str(), randomizerPresetSelected);
|
||||
//}
|
||||
//ImGui::SameLine();
|
||||
//ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 35.f);
|
||||
//if (UIWidgets::Button(
|
||||
// "Apply Preset##Randomizer",
|
||||
// UIWidgets::ButtonOptions().Color(THEME_COLOR).Size(UIWidgets::Sizes::Inline).Padding(ImVec2(10.f, 6.f)))) {
|
||||
// if (randomizerPresetSelected >= presetTypeDef.presets.size()) {
|
||||
// randomizerPresetSelected = 0;
|
||||
// }
|
||||
// const PresetDefinition selectedPresetDef = presetTypeDef.presets.at(randomizerPresetSelected);
|
||||
// for (const char* block : presetTypeDef.blocksToClear) {
|
||||
// CVarClearBlock(block);
|
||||
// }
|
||||
// if (randomizerPresetSelected != 0) {
|
||||
// applyPreset(selectedPresetDef.entries);
|
||||
// }
|
||||
// CVarSetInteger(presetTypeCvar.c_str(), randomizerPresetSelected);
|
||||
// Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
// mSettings->UpdateOptionProperties();
|
||||
// // force excluded location list and trick list update if tab is open.
|
||||
// locationsTabOpen = false;
|
||||
// tricksTabOpen = false;
|
||||
//}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
//UIWidgets::Spacer(0);
|
||||
UIWidgets::CVarCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"),
|
||||
UIWidgets::CheckboxOptions().Color(THEME_COLOR));
|
||||
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), 0)) {
|
||||
|
|
|
@ -35,7 +35,7 @@ void SohMenu::AddMenuEnhancements() {
|
|||
AddMenuEntry("Enhancements", CVAR_SETTING("Menu.EnhancementsSidebarSection"));
|
||||
|
||||
// Enhancements
|
||||
WidgetPath path = { "Enhancements", "Presets", SECTION_COLUMN_1 };
|
||||
/*WidgetPath path = {"Enhancements", "Presets", SECTION_COLUMN_1};
|
||||
AddSidebarEntry("Enhancements", path.sidebarName, 3);
|
||||
|
||||
const PresetTypeDefinition presetTypeDef = presetTypes.at(PRESET_TYPE_ENHANCEMENTS);
|
||||
|
@ -75,10 +75,11 @@ void SohMenu::AddMenuEnhancements() {
|
|||
}
|
||||
CVarSetInteger(presetTypeCvar.c_str(), selectedPresetId);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
});
|
||||
});*/
|
||||
|
||||
// Quality of Life
|
||||
path.sidebarName = "Quality of Life";
|
||||
//path.sidebarName = "Quality of Life";
|
||||
WidgetPath path = { "Enhancements", "Quality of Life", SECTION_COLUMN_1 };
|
||||
AddSidebarEntry("Enhancements", path.sidebarName, 3);
|
||||
path.column = SECTION_COLUMN_1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue