MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / combo_box

Method combo_box

framework/drawer.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106bool 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
127bool Drawer::button(const char *caption)
128{

Callers 15

on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80
on_update_ui_overlayMethod · 0.80

Calls 2

emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected