Skip to content

Commit 2e429be

Browse files
author
Julian C. Stamm
committed
Add size_t combo menu
1 parent 1717978 commit 2e429be

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/framework/imguiutil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ bool ImGui::Combo(const char* label, unsigned int* curr, const std::vector<std::
7070
return ImGui::Combo(label, reinterpret_cast<int*>(curr), items);
7171
}
7272

73+
bool ImGui::Combo(const char* label, size_t* curr, const std::vector<std::string>& items) {
74+
return ImGui::Combo(label, reinterpret_cast<int*>(curr), items);
75+
}
76+
7377
bool ImGui::FlagCheckbox(const char* label, unsigned int* flags, unsigned int flagBitIndex) {
7478
bool flag = (*flags & (1 << flagBitIndex)) != 0;
7579
bool changed = ImGui::Checkbox(label, &flag);

src/framework/imguiutil.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace ImGui {
1212
bool AngleSlider3(const char* label, glm::vec3& angles);
1313
bool Combo(const char* label, int* curr, const std::vector<std::string>& items);
1414
bool Combo(const char* label, unsigned int* curr, const std::vector<std::string>& items);
15+
bool Combo(const char* label, size_t* curr, const std::vector<std::string>& item);
1516
bool FlagCheckbox(const char* label, unsigned int* flags, unsigned int flagBitIndex);
1617

1718
}

0 commit comments

Comments
 (0)