From b95b8d41108cbb027033a0a059d756498a003fb2 Mon Sep 17 00:00:00 2001 From: TAiGA <> Date: Sat, 20 Mar 2021 21:05:02 +0800 Subject: [PATCH] Update --- plugin/matrix/matrix.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/plugin/matrix/matrix.cpp b/plugin/matrix/matrix.cpp index 5a6a22f..5aa77e3 100644 --- a/plugin/matrix/matrix.cpp +++ b/plugin/matrix/matrix.cpp @@ -578,7 +578,7 @@ static void UserInterface() ImGui::Checkbox("Apple AMX", &amx); if (amx) { - ImGui::SetNextWindowSize(ImVec2(1200, 440), ImGuiCond_Appearing); + ImGui::SetNextWindowSize(ImVec2(1280, 512), ImGuiCond_Appearing); if (ImGui::Begin("Apple AMX Registers")) { static int opcode = 0; @@ -594,19 +594,25 @@ static void UserInterface() ImGui::SameLine(); click |= ImGui::RadioButton("MATINT", &opcode, 2); + int number = 0; for (int i = 64 - 1; i >= 0; --i) { - char label[16]; - snprintf(label, 16, "##%d", i + 4000); - click |= ImGui::Checkbox(label, &operands[i]); + number = (number << 1) | operands[i]; + click |= ImGui::Checkbox(GetLabel(), &operands[i]); if (ImGui::IsItemHovered()) { ImGui::SetTooltip("%d", i); } - if (i != 10 && i != 20 && i != 27 && i != 32 && i != 48 && i != 0) + if (i != 0 && i != 10 && i != 20 && i != 27 && i != 32 && i != 47 && i != 0 && (opcode == 0 || (i != 42 && i != 58))) { ImGui::SameLine(); } + else + { + ImGui::SameLine(); + ImGui::Text("%d", number); + number = 0; + } } for (int i = 0; i < 8; ++i)