A searchable dropdown/combo box that allows filtering options as you type. Implemented using Dear ImGui.
void ImguiManager::Render() {
static const std::vector<std::string> dataTypeOptions = {
"int", "float", "double", "char", "bool", "string",
"int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t", "int64_t", "uint64_t",
"std::vector", "std::array", "std::list", "std::map", "std::set", "std::unordered_map",
"std::unique_ptr", "std::shared_ptr", "std::weak_ptr",
"std::string", "std::string_view", "std::filesystem::path",
"MyCustomClass", "ApplicationSettings", "UserProfile"
};
static std::string str = "Hello world";
static std::string str2 = "Hello world2";
ImGui::Begin("Mir::Dropdown()");
Mir::Dropdown(str, "id1", dataTypeOptions);
Mir::Dropdown(str2, "id2", dataTypeOptions);
ImGui::End();
};- None.
- Tool for myself and currently does what i wants.
Dependencies:
- Windows - For WindowsFileDialog.cpp
- Dear ImGui - For Main functionality
- GLFW - for ImGui backend
- OpenGL - for ImGUi backend
- C++23 - for std::string.contains()
-
Clone the repository:
git clone https://github.com/Mairooriam/Dropdown.git cd Dropdown -
Create a build directory:
mkdir build cd build -
Configure the project:
cmake ..
-
Build the project:
cmake --build . --config Release -
Run the example:
./Mir/dropdown
This project is licensed under the MIT License - see the LICENSE.txt file for details.
This project uses the following third-party libraries:
- Dear ImGui - MIT License - View License
- GLFW - zlib/libpng License - View License
