Cal's requests.

This commit is contained in:
Malkierian 2025-04-10 19:49:47 -07:00
commit 97d454118a
8 changed files with 37 additions and 31 deletions

View file

@ -2376,10 +2376,12 @@ void CosmeticsEditorWindow::DrawElement() {
.Step(0.01f) .Step(0.01f)
.Size(ImVec2(300.0f, 0.0f)) .Size(ImVec2(300.0f, 0.0f))
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::CVarCheckbox("Randomize All on New Scene", CVAR_COSMETIC("RandomizeAllOnNewScene"), UIWidgets::CVarCheckbox("Randomize All on New Scene", CVAR_COSMETIC("RandomizeAllOnNewScene"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Color(THEME_COLOR) .Color(THEME_COLOR)
.Tooltip("Enables randomizing all unlocked cosmetics when you enter a new scene.")); .Tooltip("Enables randomizing all unlocked cosmetics when you enter a new scene."));
ImGui::EndDisabled();
UIWidgets::CVarCheckbox( UIWidgets::CVarCheckbox(
"Advanced Mode", CVAR_COSMETIC("AdvancedMode"), "Advanced Mode", CVAR_COSMETIC("AdvancedMode"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
@ -2408,9 +2410,12 @@ void CosmeticsEditorWindow::DrawElement() {
} }
} }
} }
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
if (UIWidgets::Button("Randomize All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) { if (UIWidgets::Button("Randomize All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) {
CosmeticsEditor_RandomizeAll(); CosmeticsEditor_RandomizeAll();
} }
ImGui::EndDisabled();
ImGui::SameLine(); ImGui::SameLine();
if (UIWidgets::Button("Reset All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) { if (UIWidgets::Button("Reset All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) {
CVarClearBlock("gCosmetics"); CVarClearBlock("gCosmetics");
@ -2432,6 +2437,7 @@ void CosmeticsEditorWindow::DrawElement() {
} }
} }
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
if (UIWidgets::Button("Rainbow All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) { if (UIWidgets::Button("Rainbow All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) {
for (auto& [id, cosmeticOption] : cosmeticOptions) { for (auto& [id, cosmeticOption] : cosmeticOptions) {
if (!CVarGetInteger(cosmeticOption.lockedCvar, 0) && if (!CVarGetInteger(cosmeticOption.lockedCvar, 0) &&
@ -2441,6 +2447,8 @@ void CosmeticsEditorWindow::DrawElement() {
} }
} }
} }
ImGui::EndDisabled();
ImGui::SameLine(); ImGui::SameLine();
if (UIWidgets::Button("Un-Rainbow All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) { if (UIWidgets::Button("Un-Rainbow All", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) {
for (auto& [id, cosmeticOption] : cosmeticOptions) { for (auto& [id, cosmeticOption] : cosmeticOptions) {
@ -2470,6 +2478,7 @@ void CosmeticsEditorWindow::DrawElement() {
if (ImGui::BeginTabItem("Keys")) { if (ImGui::BeginTabItem("Keys")) {
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::Separator(true, true, 2.0f, 2.0f); UIWidgets::Separator(true, true, 2.0f, 2.0f);
if (UIWidgets::Button("Give all keys dungeon-specific colors", if (UIWidgets::Button("Give all keys dungeon-specific colors",
@ -2483,6 +2492,7 @@ void CosmeticsEditorWindow::DrawElement() {
DrawCosmeticGroup(COSMETICS_GROUP_SMALL_KEYS); DrawCosmeticGroup(COSMETICS_GROUP_SMALL_KEYS);
DrawCosmeticGroup(COSMETICS_GROUP_BOSS_KEYS); DrawCosmeticGroup(COSMETICS_GROUP_BOSS_KEYS);
ImGui::EndDisabled();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }

View file

@ -368,7 +368,9 @@ void OptionGroup::Disable() {
bool OptionGroup::RenderImGui() const { // NOLINT(*-no-recursion) bool OptionGroup::RenderImGui() const { // NOLINT(*-no-recursion)
ImGuiWindow* window = ImGui::GetCurrentWindow(); ImGuiWindow* window = ImGui::GetCurrentWindow();
bool changed = false; bool changed = false;
ImGui::BeginDisabled(mDisabled); ImGui::BeginDisabled(mDisabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) ||
CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0) ||
CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0));
if (mContainerType == WidgetContainerType::TABLE) { if (mContainerType == WidgetContainerType::TABLE) {
if (ImGui::BeginTable(mName.c_str(), static_cast<int>(mSubGroups.size()), if (ImGui::BeginTable(mName.c_str(), static_cast<int>(mSubGroups.size()),
ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) { ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {

View file

@ -3690,6 +3690,7 @@ void RandomizerSettingsWindow::DrawElement() {
locationsTabOpen = false; locationsTabOpen = false;
tricksTabOpen = false; tricksTabOpen = false;
} }
ImGui::EndDisabled();
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
UIWidgets::CVarCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"), UIWidgets::CVarCheckbox("Manual seed entry", CVAR_RANDOMIZER_SETTING("ManualSeedEntry"),
@ -3725,9 +3726,7 @@ void RandomizerSettingsWindow::DrawElement() {
} }
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
ImGui::BeginDisabled((CVarGetInteger(CVAR_RANDOMIZER_SETTING("DontGenerateSpoiler"), 0) && ImGui::BeginDisabled((gSaveContext.gameMode != GAMEMODE_FILE_SELECT) || GameInteractor::IsSaveLoaded());
gSaveContext.gameMode != GAMEMODE_FILE_SELECT) ||
GameInteractor::IsSaveLoaded());
if (UIWidgets::Button("Generate Randomizer", if (UIWidgets::Button("Generate Randomizer",
UIWidgets::ButtonOptions().Size(ImVec2(250.f, 0.f)).Color(THEME_COLOR))) { UIWidgets::ButtonOptions().Size(ImVec2(250.f, 0.f)).Color(THEME_COLOR))) {
ctx->SetSpoilerLoaded(false); ctx->SetSpoilerLoaded(false);
@ -3746,7 +3745,6 @@ void RandomizerSettingsWindow::DrawElement() {
// ImGui::Text("Settings File: %s", presetfilepath.c_str()); // ImGui::Text("Settings File: %s", presetfilepath.c_str());
UIWidgets::Separator(true, true, 0.f, 0.f); UIWidgets::Separator(true, true, 0.f, 0.f);
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
ImGuiWindow* window = ImGui::GetCurrentWindow(); ImGuiWindow* window = ImGui::GetCurrentWindow();
static ImVec2 cellPadding(8.0f, 8.0f); static ImVec2 cellPadding(8.0f, 8.0f);
@ -3762,8 +3760,6 @@ void RandomizerSettingsWindow::DrawElement() {
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
if (ImGui::BeginTabItem("Items")) { if (ImGui::BeginTabItem("Items")) {
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
@ -3775,23 +3771,23 @@ void RandomizerSettingsWindow::DrawElement() {
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
ImGui::EndDisabled();
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
if (ImGui::BeginTabItem("Gameplay")) { if (ImGui::BeginTabItem("Gameplay")) {
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
if (mSettings->GetOptionGroup(RSG_GAMEPLAY_IMGUI_TABLE).RenderImGui()) { if (mSettings->GetOptionGroup(RSG_GAMEPLAY_IMGUI_TABLE).RenderImGui()) {
mNeedsUpdate = true; mNeedsUpdate = true;
} }
ImGui::EndDisabled();
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
ImGui::EndDisabled();
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
if (ImGui::BeginTabItem("Locations")) { if (ImGui::BeginTabItem("Locations")) {
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) || disableEditingRandoSettings ||
CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding);
if (!locationsTabOpen) { if (!locationsTabOpen) {
locationsTabOpen = true; locationsTabOpen = true;
@ -3924,10 +3920,10 @@ void RandomizerSettingsWindow::DrawElement() {
} }
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
ImGui::EndTabItem(); ImGui::EndTabItem();
ImGui::EndDisabled();
} else { } else {
locationsTabOpen = false; locationsTabOpen = false;
} }
ImGui::EndDisabled();
if (ImGui::BeginTabItem("Tricks/Glitches")) { if (ImGui::BeginTabItem("Tricks/Glitches")) {
if (!tricksTabOpen) { if (!tricksTabOpen) {
@ -3975,8 +3971,9 @@ void RandomizerSettingsWindow::DrawElement() {
ImGui::EndTable(); ImGui::EndTable();
} }
ImGui::BeginDisabled(CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) == ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) || disableEditingRandoSettings ||
RO_LOGIC_VANILLA); CVarGetInteger(CVAR_RANDOMIZER_SETTING("LogicRules"), RO_LOGIC_GLITCHLESS) ==
RO_LOGIC_VANILLA);
// Tricks // Tricks
static std::unordered_map<RandomizerArea, bool> areaTreeDisabled{ static std::unordered_map<RandomizerArea, bool> areaTreeDisabled{
@ -4354,9 +4351,6 @@ void RandomizerSettingsWindow::DrawElement() {
ImGui::EndTabBar(); ImGui::EndTabBar();
} }
UIWidgets::PopStyleTabs(); UIWidgets::PopStyleTabs();
ImGui::EndDisabled();
ImGui::EndDisabled();
} }
void RandomizerSettingsWindow::UpdateElement() { void RandomizerSettingsWindow::UpdateElement() {

View file

@ -2075,11 +2075,13 @@ void CheckTrackerSettingsWindow::DrawElement() {
.DefaultIndex(TRACKER_COMBO_BUTTON_L)); .DefaultIndex(TRACKER_COMBO_BUTTON_L));
} }
} }
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::CVarCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers"), UIWidgets::CVarCheckbox("Vanilla/MQ Dungeon Spoilers", CVAR_TRACKER_CHECK("MQSpoilers"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. " .Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. "
"Otherwise, Vanilla/MQ dungeon locations must be unlocked.") "Otherwise, Vanilla/MQ dungeon locations must be unlocked.")
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::EndDisabled();
if (UIWidgets::CVarCheckbox( if (UIWidgets::CVarCheckbox(
"Hide unshuffled shop item checks", CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"), "Hide unshuffled shop item checks", CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
@ -2100,6 +2102,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("If enabled, will show a check's logic when hovering over it.") .Tooltip("If enabled, will show a check's logic when hovering over it.")
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
if (UIWidgets::CVarCheckbox("Enable Available Checks", CVAR_TRACKER_CHECK("EnableAvailableChecks"), if (UIWidgets::CVarCheckbox("Enable Available Checks", CVAR_TRACKER_CHECK("EnableAvailableChecks"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("If enabled, will show the checks that are available to be collected " .Tooltip("If enabled, will show the checks that are available to be collected "
@ -2108,6 +2111,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0); enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
RecalculateAvailableChecks(); RecalculateAvailableChecks();
} }
ImGui::EndDisabled();
// Filtering settings // Filtering settings
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();

View file

@ -690,6 +690,7 @@ void EntranceTrackerSettingsWindow::DrawElement() {
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("Automatically scroll to the first available entrance in the current scene") .Tooltip("Automatically scroll to the first available entrance in the current scene")
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::CVarCheckbox("Highlight previous", CVAR_TRACKER_ENTRANCE("HighlightPrevious"), UIWidgets::CVarCheckbox("Highlight previous", CVAR_TRACKER_ENTRANCE("HighlightPrevious"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("Highlight the previous entrance that Link came from") .Tooltip("Highlight the previous entrance that Link came from")
@ -698,6 +699,7 @@ void EntranceTrackerSettingsWindow::DrawElement() {
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("Highlight available entrances in the current scene") .Tooltip("Highlight available entrances in the current scene")
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::EndDisabled();
UIWidgets::CVarCheckbox("Hide undiscovered", CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), UIWidgets::CVarCheckbox("Hide undiscovered", CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("Collapse undiscovered entrances towards the bottom of each group") .Tooltip("Collapse undiscovered entrances towards the bottom of each group")
@ -724,6 +726,7 @@ void EntranceTrackerSettingsWindow::DrawElement() {
UIWidgets::RadioButtonsOptions().Color(THEME_COLOR).Tooltip("Group entrances by their entrance type")); UIWidgets::RadioButtonsOptions().Color(THEME_COLOR).Tooltip("Group entrances by their entrance type"));
ImGui::Text("Spoiler Reveal"); ImGui::Text("Spoiler Reveal");
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::CVarCheckbox( UIWidgets::CVarCheckbox(
"Show Source", CVAR_TRACKER_ENTRANCE("ShowFrom"), "Show Source", CVAR_TRACKER_ENTRANCE("ShowFrom"),
UIWidgets::CheckboxOptions().Tooltip("Reveal the sourcefor undiscovered entrances").Color(THEME_COLOR)); UIWidgets::CheckboxOptions().Tooltip("Reveal the sourcefor undiscovered entrances").Color(THEME_COLOR));
@ -731,7 +734,7 @@ void EntranceTrackerSettingsWindow::DrawElement() {
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("Reveal the destination for undiscovered entrances") .Tooltip("Reveal the destination for undiscovered entrances")
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::EndDisabled();
ImGui::EndTable(); ImGui::EndTable();
} }

View file

@ -222,7 +222,6 @@ void SohMenu::AddMenuEnhancements() {
.Options(CheckboxOptions().Tooltip("Disable Random Camera Wiggle at Low Health.")); .Options(CheckboxOptions().Tooltip("Disable Random Camera Wiggle at Low Health."));
AddWidget(path, "Better Owl", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Better Owl", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("BetterOwl")) .CVar(CVAR_ENHANCEMENT("BetterOwl"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"The default response to Kaepora Gaebora is always that you understood what he said.")); "The default response to Kaepora Gaebora is always that you understood what he said."));

View file

@ -31,7 +31,6 @@ void SohMenu::AddMenuNetwork() {
"page to your clipboard.", "page to your clipboard.",
WIDGET_TEXT); WIDGET_TEXT);
AddWidget(path, ICON_FA_CLIPBOARD "##Sail", WIDGET_BUTTON) AddWidget(path, ICON_FA_CLIPBOARD "##Sail", WIDGET_BUTTON)
.RaceDisable(false)
.Callback([](WidgetInfo& info) { .Callback([](WidgetInfo& info) {
ImGui::SetClipboardText("https://github.com/HarbourMasters/sail"); ImGui::SetClipboardText("https://github.com/HarbourMasters/sail");
Notification::Emit({ Notification::Emit({
@ -39,8 +38,8 @@ void SohMenu::AddMenuNetwork() {
}); });
}) })
.Options(ButtonOptions().Tooltip("https://github.com/HarbourMasters/sail")); .Options(ButtonOptions().Tooltip("https://github.com/HarbourMasters/sail"));
AddWidget(path, "Host & Port", WIDGET_CUSTOM).RaceDisable(false).CustomFunction([](WidgetInfo& info) { AddWidget(path, "Host & Port", WIDGET_CUSTOM).CustomFunction([](WidgetInfo& info) {
ImGui::BeginDisabled(Sail::Instance->isEnabled); ImGui::BeginDisabled(Sail::Instance->isEnabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
ImGui::Text("%s", info.name.c_str()); ImGui::Text("%s", info.name.c_str());
CVarInputString("##HostSail", CVAR_REMOTE_SAIL("Host"), CVarInputString("##HostSail", CVAR_REMOTE_SAIL("Host"),
InputOptions() InputOptions()
@ -62,7 +61,6 @@ void SohMenu::AddMenuNetwork() {
ImGui::EndDisabled(); ImGui::EndDisabled();
}); });
AddWidget(path, "Enable##Sail", WIDGET_BUTTON) AddWidget(path, "Enable##Sail", WIDGET_BUTTON)
.RaceDisable(false)
.PreFunc([](WidgetInfo& info) { .PreFunc([](WidgetInfo& info) {
std::string host = CVarGetString(CVAR_REMOTE_SAIL("Host"), "127.0.0.1"); std::string host = CVarGetString(CVAR_REMOTE_SAIL("Host"), "127.0.0.1");
uint16_t port = CVarGetInteger(CVAR_REMOTE_SAIL("Port"), 43384); uint16_t port = CVarGetInteger(CVAR_REMOTE_SAIL("Port"), 43384);
@ -105,7 +103,6 @@ void SohMenu::AddMenuNetwork() {
"website to your clipboard.", "website to your clipboard.",
WIDGET_TEXT); WIDGET_TEXT);
AddWidget(path, ICON_FA_CLIPBOARD "##CrowdControl", WIDGET_BUTTON) AddWidget(path, ICON_FA_CLIPBOARD "##CrowdControl", WIDGET_BUTTON)
.RaceDisable(false)
.Callback([](WidgetInfo& info) { .Callback([](WidgetInfo& info) {
ImGui::SetClipboardText("https://crowdcontrol.live"); ImGui::SetClipboardText("https://crowdcontrol.live");
Notification::Emit({ Notification::Emit({
@ -113,8 +110,8 @@ void SohMenu::AddMenuNetwork() {
}); });
}) })
.Options(ButtonOptions().Tooltip("https://crowdcontrol.live")); .Options(ButtonOptions().Tooltip("https://crowdcontrol.live"));
AddWidget(path, "Host & Port", WIDGET_CUSTOM).RaceDisable(false).CustomFunction([](WidgetInfo& info) { AddWidget(path, "Host & Port", WIDGET_CUSTOM).CustomFunction([](WidgetInfo& info) {
ImGui::BeginDisabled(CrowdControl::Instance->isEnabled); ImGui::BeginDisabled(CrowdControl::Instance->isEnabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
ImGui::Text("%s", info.name.c_str()); ImGui::Text("%s", info.name.c_str());
CVarInputString("##HostCrowdControl", CVAR_REMOTE_CROWD_CONTROL("Host"), CVarInputString("##HostCrowdControl", CVAR_REMOTE_CROWD_CONTROL("Host"),
InputOptions() InputOptions()
@ -136,7 +133,6 @@ void SohMenu::AddMenuNetwork() {
ImGui::EndDisabled(); ImGui::EndDisabled();
}); });
AddWidget(path, "Enable##CrowdControl", WIDGET_BUTTON) AddWidget(path, "Enable##CrowdControl", WIDGET_BUTTON)
.RaceDisable(false)
.PreFunc([](WidgetInfo& info) { .PreFunc([](WidgetInfo& info) {
std::string host = CVarGetString(CVAR_REMOTE_CROWD_CONTROL("Host"), "127.0.0.1"); std::string host = CVarGetString(CVAR_REMOTE_CROWD_CONTROL("Host"), "127.0.0.1");
uint16_t port = CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Port"), 43384); uint16_t port = CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("Port"), 43384);

View file

@ -35,7 +35,6 @@ void SohMenu::AddMenuRandomizer() {
.DefaultValue(true)); .DefaultValue(true));
AddWidget(path, "Use Custom Key Models", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Use Custom Key Models", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_RANDOMIZER_ENHANCEMENT("CustomKeyModels")) .CVar(CVAR_RANDOMIZER_ENHANCEMENT("CustomKeyModels"))
.RaceDisable(false)
.Options( .Options(
CheckboxOptions() CheckboxOptions()
.Tooltip("Use Custom graphics for Dungeon Keys, Big and Small, so that they can be easily told apart.") .Tooltip("Use Custom graphics for Dungeon Keys, Big and Small, so that they can be easily told apart.")
@ -80,7 +79,6 @@ void SohMenu::AddMenuRandomizer() {
"This might make boss souls more distinguishable from a distance, and can help with performance.")); "This might make boss souls more distinguishable from a distance, and can help with performance."));
AddWidget(path, "Skip Get Item Animations", WIDGET_CVAR_COMBOBOX) AddWidget(path, "Skip Get Item Animations", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation")) .CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"))
.RaceDisable(false)
.Options(ComboboxOptions().ComboMap(skipGetItemAnimationOptions).DefaultIndex(SGIA_JUNK)); .Options(ComboboxOptions().ComboMap(skipGetItemAnimationOptions).DefaultIndex(SGIA_JUNK));
AddWidget(path, "Item Scale: %.2f", WIDGET_CVAR_SLIDER_FLOAT) AddWidget(path, "Item Scale: %.2f", WIDGET_CVAR_SLIDER_FLOAT)
.CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimationScale")) .CVar(CVAR_RANDOMIZER_ENHANCEMENT("TimeSavers.SkipGetItemAnimationScale"))