Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 6 days 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-17T00:38:11.000Z (5 months ago)
- Last Synced: 2025-01-09T01:38:27.505Z (13 days ago)
- Topics: gui, imgui, immediate-gui, nanovg, nim, nim-lang, opengl
- Language: Nim
- Homepage:
- Size: 2.84 MB
- Stars: 74
- 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-orig-flat](https://github.com/johnnovak/koi/assets/698770/76e55eb0-c01c-4f9d-9ed0-a325058a21b0)
**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.