Skip to content
/ imtui Public
forked from ggerganov/imtui

ImTui: Immediate Mode Text-based User Interface

License

Notifications You must be signed in to change notification settings

dvj/imtui

 
 

Repository files navigation

imtui

Actions Status ImTui v1.0.3 badge Dear ImGui version badge

ImTui is an immediate mode text-based user interface library. Supports 256 ANSI colors and mouse/keyboard input.

imtui-sample

wtf-tui-demo

imtui-screenshot-0

imtui-screenshot-1

Live demo in the browser

Eventhough this library is supposed to be used in the terminal, for convenience here is an Emscripten build to demonstrate what it looks like, by simulating a console in the browser:

Note: the demos work best with Chrome

Details

This library is 99.9% based on the popular Dear ImGui library. ImTui simply provides an ncurses interface in order to draw and interact with widgets in the terminal. The entire Dear ImGui interface is available out-of-the-box.

For basic usage of ImTui, check one of the available samples:

Building

ImTui depends only on libncurses

Linux and Mac:

git clone https://github.com/ggerganov/imtui --recursive
cd imtui
mkdir build && cd build
cmake ..
make

./bin/imtui-example-ncurses0

Windows:

Partial Windows support is currently available using MSYS2 + MinGW + PDCurses:

# install required packages in an MSYS2 terminal:
pacman -S git cmake make mingw-w64-x86_64-dlfcn mingw-w64-x86_64-gcc mingw-w64-x86_64-pdcurses mingw-w64-x86_64-curl

# build
git clone https://github.com/ggerganov/imtui --recursive
cd imtui
mkdir build && cd build
cmake ..
make

./bin/hnterm.exe

For more information, checkout the following discussion: #19

Emscripten:

git clone https://github.com/ggerganov/imtui --recursive
cd imtui
mkdir build && cd build
emconfigure cmake ..
make

About

ImTui: Immediate Mode Text-based User Interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 84.7%
  • CMake 15.3%