user-simon / Fungal-UI

:mushroom: A lightweight terminal UI framework
GNU General Public License v3.0
28 stars 3 forks source link
console console-ui cpp terminal terminal-based terminal-ui tui ui

:mushroom: Fungal UI

A simple terminal UI framework

Disclaimer: this was written a long time ago and I've come a long way as a programmer. I have no reason to believe that this library wouldn't function as promised, but I don't entirely stand for all of the code style and practises found within.


:grey_question: About

Fungal UI is a simple library, made mostly for fun, to create UIs in console-based C++ applications.

Much like VIM, you can launch a Fungal UI program from the terminal and return to the original console buffer after exiting.

Nothing fancy, but one could reasonably extend the project to handle both mouse events and 2D control positioning -- the reason I haven't is that such features seemed outside the scope of the simple UI library I wanted to make but I might revisit at a later date and build upon it further.

Key bindings

Navigation between controls is performed with the Arrow up-down keys and the Tab key, navigation within a control is performed with the Arrow left-right keys, and controls are drawn vertically, in a list-like fashion.

Escape allows you to go back to whichever control was displayed previously and if there are none, the program exits.

Compatability

This library is compatible with projects running on Windows and using C++17 or above. Since there are only a few functions which are Windows-dependant, one could with some minor trouble generalize it to work for Linux as well.

:closed_book: Wiki

:test_tube: Building

Use the included CMake files and build as normal.

:x: Known issues

:toolbox: Example

:trophy: Credit

CMake files generated from a Visual Studio project with pavelliavonau/cmakeconverter.