You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library implements a Sublime Text or VSCode style command palette in ImGui.
It is provided in the form of a window that you can choose to open/close based on condition (for example, when user pressed the shortcut Ctrl+Shift+P).
Features
Minimum C++ 11
Dynamic registration and unregistration of commands
Subcommands (prompting a new set of options after user selected a top-level command)
Fuzzy search of commands and subcommands
Highlighting of matched characters
Option: setting custom font
Option: setting custom text color
Planned Features
Support for std::string_view
Support for function pointers instead of std::function
Visualization of previously entered options (example: Sublime Merge)
Highlighting of matched characters using underline
Command history
Reducing the minimum required C++ version
Usage
Simply drop all .h and .cpp files in the project root folder to your buildsystem. Minimum of C++11 is required.
No external dependencies except Dear ImGui are required.
See the examples for how to use the APIs.
Examples
The examples/ folder is organized in the following way:
The src/ and fonts/ folders contains source code and assets for the example app. If you want to hack away, the relevant code are all here!
The app-*/ folders each provide a separate way to build the project. Choose one that works the best for you -- they should all produce the same result.
Once you have it built, run the examples with working directory = examples/.
This is needed because the app uses relative paths to locate fonts.
That is, if the build had produced examples/app-vcpkg/build/imcmd-demo.exe for example, you should run it as: