Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nsauzede/vnk
☢️ V Nuklear module -- nuklear wrapper
https://github.com/nsauzede/vnk
hacktoberfest
Last synced: about 1 month ago
JSON representation
☢️ V Nuklear module -- nuklear wrapper
- Host: GitHub
- URL: https://github.com/nsauzede/vnk
- Owner: nsauzede
- License: mit
- Created: 2019-11-07T01:24:21.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T15:07:32.000Z (10 months ago)
- Last Synced: 2024-08-04T01:05:41.308Z (5 months ago)
- Topics: hacktoberfest
- Language: V
- Homepage:
- Size: 73.2 KB
- Stars: 46
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - vnk - Bindings for [Nuklear](https://github.com/vurtun/nuklear) GUI toolkit. (Libraries / User Interface toolkits)
README
# vnk
**This is still work-in-progress!**V Nuklear module -- a nuklear wrapper in V language
If you are new to nuklear see [here](https://github.com/Immediate-Mode-UI/Nuklear)
If you are new to V language see [here](https://vlang.io/)
Current APIs available/tested in examples :
- create SDL2 / OpenGL window
- set clear color
- create nuklear subwindows
- create widgets : buttons, slider, text inputs, color picker, etc...
- persistent layout
- debug tools : FPS, stats, etc..# Examples
See in examples/mainnk_v/mainnk_v.v
This is a V port of Nuklear sdl_opengl3 demo
How to test `vnk` on linux : (prerequisite : v is already installed and in the PATH)
```
$ v install nsauzede.vsdl2
$ v install nsauzede.vnk
$ cd ~/.vmodules/nsauzede/vnk
$ make
$ v run examples/mainnk_v/mainnk_v.v
```There is also a hot-reload mode (-live) :
```
$ cd ~/.vmodules/nsauzede/vnk
$ v -live run examples/mainnk_v/mainnk_v.v
```
In hot-reload mode, once the vnk demo windows is shown, try to modify the `live_main` function (tagged with `[live]`)
to see the "live" changes appearing a few instants after saving the source file.
Enjoy !# Dependencies
Ubuntu :
`$ sudo apt install git cmake libsdl2-dev libglew-dev libsdl2-ttf-dev libsdl2-mixer-dev`ClearLinux :
`$ sudo swupd bundle-add git cmake devpkg-SDL2 devpkg-glew devpkg-SDL2_ttf devpkg-SDL2_mixer`Windows/MSYS2 :
`$ pacman -S msys/git mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-glew mingw64/mingw-w64-x86_64-SDL2_ttf mingw64/mingw-w64-x86_64-SDL2_mixer`