Commit abc7d184 authored by w4t's avatar w4t

VectorListBox

parent 2f2a2663
Pipeline #62 canceled with stages
......@@ -772,4 +772,12 @@ bool ofxImGui::VectorCombo(const char* label, int* currIndex, std::vector<std::s
if (values.empty()) { return false; }
return ImGui::Combo(label, currIndex, vector_getter,
static_cast<void*>(&values), values.size());
}
//--------------------------------------------------------------
bool ofxImGui::VectorListBox(const char* label, int* currIndex, std::vector<std::string>& values)
{
if (values.empty()) { return false; }
return ImGui::ListBox(label, currIndex, vector_getter,
static_cast<void*>(&values), values.size());
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ static const int kImGuiMargin = 10;
namespace ofxImGui
{
bool VectorCombo(const char* label, int* currIndex, std::vector<std::string>& values);
bool VectorListBox(const char* label, int* currIndex, std::vector<std::string>& values);
struct WindowOpen
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment