| 1081 | } |
| 1082 | |
| 1083 | void DrawFlagArray16(const std::string& name, uint16_t& flags, Colors color) { |
| 1084 | ImGui::PushID(name.c_str()); |
| 1085 | for (int16_t flagIndex = 0; flagIndex < 16; flagIndex++) { |
| 1086 | if ((flagIndex % 8) != 0) { |
| 1087 | ImGui::SameLine(); |
| 1088 | } |
| 1089 | ImGui::PushID(flagIndex); |
| 1090 | uint16_t bitMask = 1 << flagIndex; |
| 1091 | bool flag = (flags & bitMask) != 0; |
| 1092 | PushStyleCheckbox(color); |
| 1093 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4.0f, 3.0f)); |
| 1094 | std::string id = fmt::format("##{}{}", name, flagIndex); |
| 1095 | if (ImGui::Checkbox(id.c_str(), &flag)) { |
| 1096 | if (flag) { |
| 1097 | flags |= bitMask; |
| 1098 | } else { |
| 1099 | flags &= ~bitMask; |
| 1100 | } |
| 1101 | } |
| 1102 | ImGui::PopStyleVar(); |
| 1103 | PopStyleCheckbox(); |
| 1104 | ImGui::PopID(); |
| 1105 | } |
| 1106 | ImGui::PopID(); |
| 1107 | } |
| 1108 | |
| 1109 | void DrawFlagArray8(const std::string& name, uint8_t& flags, Colors color) { |
| 1110 | ImGui::PushID(name.c_str()); |
nothing calls this directly
no test coverage detected