Giter Site home page Giter Site logo

imgui-command-palette's Introduction

ImGui Command Palette

screenshot1

About

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.

Demo

This project provides examples located in the examples/ folder. All dependencies are retreived with conan and built with CMake. One option to build the examples:

# In examples/
$ mkdir build
$ cd build
$ conan install .. -s build_type=Debug
$ cmake .. -GNinja
$ ninja

Note: run the examples with working directory = ${projectFolder}/examples, since they use relative paths to locate the fonts

imgui-command-palette's People

Contributors

hnosmium0001 avatar pthom avatar root3287 avatar royawesome avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.