overlay: card override input should be disabled when overridden with cmd line (#599)

This commit is contained in:
bicarus
2026-03-29 20:36:42 -07:00
committed by GitHub
parent d66af8e16b
commit b06a0a7d47
+12
View File
@@ -3804,6 +3804,7 @@ namespace overlay::windows {
this->keypads_card_override_valid[player] ? ImVec4(1.f, 1.f, 1.f, 1.f) :
ImVec4(1.f, 0.f, 0.f, 1.f));
ImGui::SetNextItemWidth(TEXT_INPUT_WIDTH);
ImGui::BeginDisabled(option.disabled);
ImGui::InputTextWithHint("##OverrideCard", "E004010000000000",
buffer, sizeof(buffer) - 1,
ImGuiInputTextFlags_CharsUppercase |
@@ -3824,6 +3825,9 @@ namespace overlay::windows {
this->keypads_card_override_valid[player] = false;
}
ImGui::EndDisabled();
if (!option.disabled) {
// generate button
ImGui::SameLine();
if (ImGui::Button("Generate")) {
@@ -3831,6 +3835,7 @@ namespace overlay::windows {
card_changed = true;
}
// clear button
if (option.is_active()) {
ImGui::SameLine();
if (ImGui::Button("Clear")) {
@@ -3838,6 +3843,13 @@ namespace overlay::windows {
card_changed = true;
}
}
} else {
if (ImGui::IsItemHovered(ImGui::TOOLTIP_FLAGS)) {
ImGui::HelpTooltip(
"This option cannot be edited because it was overriden by command-line options.\n"
"Run spicecfg.exe to configure the options and then run spice(64).exe directly.");
}
}
// bad card number warning
if (!this->keypads_card_override_valid[player] && buffer_len > 0) {