https://github.com/johnnovak/koi
Immediate mode UI for Nim
https://github.com/johnnovak/koi
gui imgui immediate-gui nanovg nim nim-lang opengl
Last synced: about 1 month ago
JSON representation
Immediate mode UI for Nim
- Host: GitHub
- URL: https://github.com/johnnovak/koi
- Owner: johnnovak
- Created: 2019-11-09T04:40:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-08T08:16:16.000Z (3 months ago)
- Last Synced: 2025-03-31T17:19:21.810Z (about 1 month ago)
- Topics: gui, imgui, immediate-gui, nanovg, nim, nim-lang, opengl
- Language: Nim
- Homepage:
- Size: 2.96 MB
- Stars: 79
- Watchers: 6
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koi — immediate mode UI for Nim

**koi** is a small (~5 KLOC) immediate mode UI library that uses OpenGL for rendering via NanoVG. It was mainly invented for the dungeon mapping tool [Gridmonger](https://gridmonger.johnnovak.net/) (see screenshot below), and then it evolved into a minimalist but feature-rich general-purpose UI library.
GLFW is currently a hard requirement, but it should be easy to adapt it to other frameworks or backends.
There is no documentation yet—check out the [examples](/examples) and Gridmonger for usage.
Support is currently *alpha level*, meaning that the API or the functionality might change without warning at any moment.
## Dependencies
Nim 2.0.2 or later and the following two libraries are required:
- [nim-glfw](https://github.com/johnnovak/nim-glfw)
- [nim-nanovg](https://github.com/johnnovak/nim-nanovg)You can install them with [Nimble](https://github.com/nim-lang/nimble):
```
nimble install glfw nanovg
```## Building
To build the examples (the dependencies will be auto-installed if needed):
```
nimble test
nimble paneltest
```or
```
nimble testRelease
nimble paneltestRelease
```See [config.nims](/config.nims) on how to link statically **koi** and **GLFW** to your program.
## License
Copyright © 2019-2024 John Novak <>
This work is free. You can redistribute it and/or modify it under the terms of
the [Do What The Fuck You Want To Public License, Version 2](http://www.wtfpl.net/), as published
by Sam Hocevar. See the [COPYING](./COPYING) file for more details.