The Nim GUI/2D framework based on OpenGL and SDL2.

SakiKawasaki 371453ec7d add screenshots folder. 4 rokov pred
.github 5b1b0fbc8b Merge pull request #12 from jiro4989/chore/remove-choosenim-cache 4 rokov pred
examples a3fd2755cd fix buttons 4 rokov pred
screenshots 371453ec7d add screenshots folder. 4 rokov pred
src a3fd2755cd fix buttons 4 rokov pred
tests b624c4364e add smooth mode. 4 rokov pred
.gitignore 609d9f42f4 add CollisionShape2D and debug mode. 4 rokov pred
CODE_OF_CONDUCT.md 621e4f41ee Create CODE_OF_CONDUCT.md 4 rokov pred
LICENSE eb23f4d1f3 Initial commit 5 rokov pred
README.md 371453ec7d add screenshots folder. 4 rokov pred
nodesnim.nimble 16594aef85 update version. 4 rokov pred

README.md

Nodesnim

The Nim GUI/2D framework based on OpenGL and SDL2.

Open Source Love Nim language-plastic License time tracker test

Latest version - 0.0.3

Stable version - 0.0.2

Install

  1. Install this repo
    • nimble install nodesnim or nimble install https://github.com/Ethosa/nodesnim.git
  2. Download OpenGL, SDL2_image, SDL2_mixer and freeglut Runtime binaries for your OS
  3. Put Runtime binaries in the .nimble/bin/ folder

Features

  • Godot-like node system.
  • Simple usage ```nim import nodesnim

Window("Hello, world!")

var

scene_obj: SceneObj
scene = Scene("Main", scene_obj)
label_obj: LabelObj
hello = Label(label_obj)

hello.setText("Hello, world!") hello.setSizeAnchor(1, 1) hello.setTextAlign(0.5, 0.5, 0.5, 0.5) scene.addChild(hello)

addMainScene(scene) windowLaunch() ```

Now available

This section contains links to documentation for all nodes. |Core |Default nodes |Control nodes |2D Nodes | |:--: |:--: |:--: | :--: | |Anchor |Node |Control |Node2D | |Color |Canvas |ColorRect |Sprite | |ColorText|Scene |TextureRect |AnimatedSprite | |Enums |AudioStreamPlayer|Label |YSort | |Exceptions| |Button |CollisionShape2D| |Image | |EditText |Camera2D | |Input | |RichLabel | | |Rect2 | |RichEditText | | |Vector2 | |Box | | |Circle2 | |HBox | | |Polygon2| |VBox | | |AudioStream| |GridBox | | |Animation | |Scroll | | | | |ProgressBar | | | | |Slider | | | | |VProgressBar | | | | |VSlider | | | | |Popup | | | | |TextureButton | | | | |TextureProgressBar| | | | |Counter | | | | |Switch | |

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 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

Hello world example
Calculator example
Snake game example
Screensaver example
Novel game example

F.A.Q

Q: Where can I see examples?
A: You can see this in the tests or examples folder.

Q: Where can I read the docs?
A: You can read docs here