HorizonGUI is a Graphic User Interface library made in C++ with OpenGL. There are also Python bindings available.
The examples/showcase program demonstrates the main HorizonGUI systems working together in a single window. It creates
UI widgets (labels, slider, button, text input), draws on a canvas, shows static and animated sprites, plays a generated
tone through the audio stack, and reacts to mouse/keyboard input while renderer effects and delayed tasks are active.
To try the showcase after configuring a build directory, build and run the hgui-showcase target:
cmake -S . -B build
cmake --build build --target hgui-showcase
./build/examples/showcase/bin/hgui-showcaseThe executable looks for assets in examples/assets and will generate a temporary tone file on first launch, so make
sure those resources stay alongside the repository when you run it.
You can also simply install a pre-built version here.
You first need to clone the repository. Make sure to use git and don't forget to
include --recurse-submodules when cloning.
git clone https://github.com/Horizon-NTH/HorizonGUI.git --recurse-submodulesYou will now able to choose between script or manual installation
Use the install.sh script to compile the
library. You can also erase build files by adding -e / --erase.
./install.sh -eEnsure you have CMake installed. Generate the build environment using CMake:
cd HorizonGUI
mkdir build && cd build
cmake ..Build directly using CMake:
cmake --build .This command will create all the lib files you need in HorizonGUI/lib.
Alternatively, you can use Microsoft Visual Studio to launch the project
and build it. Open the horizongui.sln file with Microsoft Visual Studio.
To install the Python bindings, you can install it from PyPi using this command: Don't forget to install the scikit-build-core package.
pip install scikit-build-core hguiOr you can build it from source using those commands:
git clone https://github.com/Horizon-NTH/HorizonGUI.git --recurse-submodules
cd HorizonGUI
pip install ./pythonNote: Both methods can take some time due to the compilation of the underlying C++ library.
Once the installation is complete, you can import the module into your Python script using the following statement:
import hguiPlease refer to the wiki.
- OpenGL is used for all graphics in the application.
- GLFW is used to create windows, contexts, and handle user input.
- Glad is used to load OpenGL functions.
- Freetype is used to load fonts and render text.
- STB is used to load and save images.
- GLM is used for mathematical operations.
- OpenAL-Soft is used to play sound.
- Libsndfile is used to load audio file.
- Pybind11 is used to create python binding.
HorizonGUI is licensed under the MIT license.
