mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
improve E004 card generation and placeholder pcbid (#748)
## Link to GitHub Issue or related Pull Request, if one exists #73 ## Description of change Generated cards now start with E0040100 to fully match real cards. The placeholder example `E004010000000000` is replaced with `E0040100FFFFFFFF`. The invalid placeholder/fallback PCBID `04040000000000000000` is replaced with `01201000000000010101`, which contains a valid header/checksum, making it closer resemble a real PCBID while still clearly being an example.
This commit is contained in:
@@ -166,7 +166,7 @@ namespace overlay::windows {
|
||||
if (ImGui::BeginPopupModal("Card Editor", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
// card ID field (only editable for new cards)
|
||||
ImGui::BeginDisabled(this->current_card);
|
||||
ImGui::InputTextWithHint("Card ID", "E0040123456789AB",
|
||||
ImGui::InputTextWithHint("Card ID", "E0040100FFFFFFFF",
|
||||
this->card_buffer,
|
||||
std::size(this->card_buffer),
|
||||
ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace overlay::windows {
|
||||
|
||||
struct CardEntry {
|
||||
std::string name = "unnamed";
|
||||
std::string id = "E004010000000000";
|
||||
std::string id = "E0040100FFFFFFFF";
|
||||
std::string search_string = "";
|
||||
bool read_only = false;
|
||||
float color[3] {};
|
||||
|
||||
@@ -3972,7 +3972,7 @@ namespace overlay::windows {
|
||||
ImVec4(1.f, 0.f, 0.f, 1.f));
|
||||
ImGui::SetNextItemWidth(TEXT_INPUT_WIDTH);
|
||||
ImGui::BeginDisabled(option.disabled);
|
||||
ImGui::InputTextWithHint("##OverrideCard", "E004010000000000",
|
||||
ImGui::InputTextWithHint("##OverrideCard", "E0040100FFFFFFFF",
|
||||
buffer, sizeof(buffer) - 1,
|
||||
ImGuiInputTextFlags_CharsUppercase |
|
||||
ImGuiInputTextFlags_CharsHexadecimal |
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace overlay::windows {
|
||||
|
||||
void Control::cards_view() {
|
||||
if (ImGui::CollapsingHeader("Cards")) {
|
||||
ImGui::InputTextWithHint("Card ID", "E0040123456789AB",
|
||||
ImGui::InputTextWithHint("Card ID", "E0040100FFFFFFFF",
|
||||
this->card_input,
|
||||
std::size(this->card_input),
|
||||
ImGuiInputTextFlags_CharsHexadecimal
|
||||
|
||||
Reference in New Issue
Block a user