PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
pk::ImGuiUtilities Namespace Reference

Functions

void removeDuplicatesSorted (std::vector< std::string > &vec)
 Removes duplicate strings from a sorted vector. Useful for Combo and ListBox when duplicate entries are undesirable. More...
 
void removeDuplicates (std::vector< std::string > &vec)
 Sort a vector and remove duplicates from it. Useful for Combo and ListBox when duplicate entries are undesirable. More...
 
bool Combo (const char *label, int *currIndex, std::vector< std::string > &values)
 Wrapper function that takes a std::vector<std::string> and converts it in place to build an ImGui::Combo element. More...
 
bool ListBox (const char *label, int *currIndex, std::vector< std::string > &values)
 Wrapper function that takes a std::vector<std::string> and converts it in place to build an ImGui::ListBox element. More...
 

Function Documentation

◆ Combo()

bool pk::ImGuiUtilities::Combo ( const char *  label,
int *  currIndex,
std::vector< std::string > &  values 
)

Wrapper function that takes a std::vector<std::string> and converts it in place to build an ImGui::Combo element.

◆ ListBox()

bool pk::ImGuiUtilities::ListBox ( const char *  label,
int *  currIndex,
std::vector< std::string > &  values 
)

Wrapper function that takes a std::vector<std::string> and converts it in place to build an ImGui::ListBox element.

◆ removeDuplicates()

void pk::ImGuiUtilities::removeDuplicates ( std::vector< std::string > &  vec)

Sort a vector and remove duplicates from it. Useful for Combo and ListBox when duplicate entries are undesirable.

Parameters
std::vector<std::string>&vec - a reference to a std::vector of std::string.

◆ removeDuplicatesSorted()

void pk::ImGuiUtilities::removeDuplicatesSorted ( std::vector< std::string > &  vec)

Removes duplicate strings from a sorted vector. Useful for Combo and ListBox when duplicate entries are undesirable.

Parameters
std::vector<std::string>&vec - a reference to a std::vector of std::string.