| 1133 | } |
| 1134 | |
| 1135 | void DrawFlagArray8Mask(const std::string& name, uint8_t& flags, Colors color) { |
| 1136 | ImGui::PushID(name.c_str()); |
| 1137 | for (int8_t flagIndex = 0; flagIndex < 8; flagIndex++) { |
| 1138 | if ((flagIndex % 8) != 0) { |
| 1139 | ImGui::SameLine(); |
| 1140 | } |
| 1141 | ImGui::PushID(flagIndex); |
| 1142 | uint8_t bitMask = 1 << flagIndex; |
| 1143 | bool flag = (flags & bitMask) != 0; |
| 1144 | PushStyleCheckbox(color); |
| 1145 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4.0f, 3.0f)); |
| 1146 | std::string id = fmt::format("##{}{}", name, flagIndex); |
| 1147 | if (ImGui::Checkbox(id.c_str(), &flag)) { |
| 1148 | if (flag) { |
| 1149 | flags |= bitMask; |
| 1150 | } else { |
| 1151 | flags &= ~bitMask; |
| 1152 | } |
| 1153 | } |
| 1154 | ImGui::PopStyleVar(); |
| 1155 | PopStyleCheckbox(); |
| 1156 | ImGui::PopID(); |
| 1157 | } |
| 1158 | ImGui::PopID(); |
| 1159 | } |
| 1160 | |
| 1161 | std::map<std::string, int32_t> buttonMap = { |
| 1162 | { "A", BTN_A }, |
nothing calls this directly
no test coverage detected