The Nim GUI/2D framework based on OpenGL and SDL2.
[](https://github.com/ellerbrock/open-source-badges/)
[](https://github.com/Ethosa/yukiko/blob/master/nim-lang.svg)
[](https://github.com/Ethosa/nodesnim/blob/master/LICENSE)
[](https://wakatime.com/badge/github/Ethosa/nodesnim)
[](https://github.com/Ethosa/nodesnim/actions)
Latest version - 0.0.4
Stable version - 0.0.3
## Install
1. Install this repo
- `nimble install nodesnim` or `nimble install https://github.com/Ethosa/nodesnim.git`
2. Install dependencies
- Linux (tested on Ubuntu and Mint):
- `sudo apt install -y freeglut3 freeglut3-dev`
- `sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev`
- Windows / MacOS:
- [SDL2](https://www.libsdl.org/download-2.0.php)
- [SDL2_image](https://www.libsdl.org/projects/SDL_image/)
- [SDL2_mixer](https://www.libsdl.org/projects/SDL_mixer/)
- [freeGLUT](http://freeglut.sourceforge.net/)
- Put Runtime binaries in the `.nimble/bin/` folder
## Features
- Godot-like node system.
- Build nodes with YML-like syntax.
- Simple usage
```nim
import nodesnim
Window("Hello, world!")
build:
- Scene scene:
name: "Main"
- Label hello:
call setSizeAnchor(1, 1)
call setTextAlign(0.5, 0.5, 0.5, 0.5)
call setText("Hello, world!")
background_color: Color(31, 45, 62)
addMainScene(scene)
windowLaunch()
```
## Now available
This section contains links to documentation for all nodes.
|Core |Default nodes |Control nodes |2D Nodes |3D Nodes |
|:--: |:--: |:--: | :--: |:--: |
|[Anchor][Anchor] |[Node][Node] |[Control][Control] |[Node2D][Node2D] |[Node3D][Node3D] |
|[Color][Color] |[Canvas][Canvas] |[ColorRect][ColorRect] |[Sprite][Sprite] |[GeometryInstance][ginstance]|
|[ColorText][clrtext]|[Scene][Scene] |[TextureRect][TextureRect] |[AnimatedSprite][asprite] | |
|[Enums][Enums] |[AudioStreamPlayer][aplay]|[Label][Label] |[YSort][YSort] | |
|[Exceptions][except]| |[Button][Button] |[CollisionShape2D][cshape2d]| |
|[Image][Image] | |[EditText][EditText] |[Camera2D][Camera2D] | |
|[Input][Input] | |[RichLabel][RichLabel] | | |
|[Rect2][Rect2] | |[RichEditText][RichEditText] | | |
|[Vector2][Vector2] | |[Box][Box] | | |
|[Circle2][Circle2] | |[HBox][HBox] | | |
|[Polygon2][Polygon2]| |[VBox][VBox] | | |
|[AudioStream][astrm]| |[GridBox][GridBox] | | |
|[Animation][anim] | |[Scroll][Scroll] | | |
|[Vector3][Vector3] | |[ProgressBar][ProgressBar] | | |
|[SceneBuilder][SBld]| |[Slider][Slider] | | |
| | |[VSlider][VSlider] | | |
| | |[Popup][Popup] | | |
| | |[TextureButton][TextureButton] | | |
| | |[TextureProgressBar][tprogress]| | |
| | |[Counter][Counter] | | |
| | |[Switch][Switch] | | |
| | |[SubWindow][swindow] | | |
| | |[LineEdit][lineedit] | | |
## Debug mode
For use debug mode you should compile with `-d:debug` or `--define:debug`, e.g. `nim c -r -d:debug main.nim`.
## Export
Use the [`Nim compiler user guide`](https://nim-lang.org/docs/nimc.html#dynliboverride) for export to the other OS.
- CrossPlatform export for Windows (tested on Windows 7 x64 and Windows 10 x64)
- `nim c -d:mingw -d:release --opt:speed --noNimblePath file.nim`
- put Runtime binaries in the folder with the program.
## Screenshots