| 104 | } |
| 105 | |
| 106 | bool Drawer::combo_box(const char *caption, int32_t *itemindex, std::vector<std::string> items) |
| 107 | { |
| 108 | if (items.empty()) |
| 109 | { |
| 110 | return false; |
| 111 | } |
| 112 | std::vector<const char *> charitems; |
| 113 | charitems.reserve(items.size()); |
| 114 | for (size_t i = 0; i < items.size(); i++) |
| 115 | { |
| 116 | charitems.push_back(items[i].c_str()); |
| 117 | } |
| 118 | uint32_t itemCount = static_cast<uint32_t>(charitems.size()); |
| 119 | bool res = ImGui::Combo(caption, itemindex, &charitems[0], itemCount, itemCount); |
| 120 | if (res) |
| 121 | { |
| 122 | dirty = true; |
| 123 | }; |
| 124 | return res; |
| 125 | } |
| 126 | |
| 127 | bool Drawer::button(const char *caption) |
| 128 | { |
no test coverage detected