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

Ethosa 7abb307658 Merge pull request #41 from Ethosa/nightly 3 years ago
.github d9ea9a09cd ... 3 years ago
examples d29944ec53 little update 3 years ago
src 89e22549a5 global refactoring :eyes: 3 years ago
tests 89e22549a5 global refactoring :eyes: 3 years ago
.gitignore c85b09b6e9 update `examples` folder 3 years ago
LICENSE cfd23c8cf3 add Tooltip 3 years ago
README.md c85b09b6e9 update `examples` folder 3 years ago
icon.svg 44460587bb small update 3 years ago
nodesnim.nimble 46141ac61b update readme.md 3 years ago

README.md

The Nim GUI/2D framework based on OpenGL and SDL2. [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) [![Nim language-plastic](https://github.com/Ethosa/yukiko/blob/master/nim-lang.svg)](https://github.com/Ethosa/yukiko/blob/master/nim-lang.svg) [![License](https://img.shields.io/github/license/Ethosa/nodesnim)](https://github.com/Ethosa/nodesnim/blob/master/LICENSE) [![time tracker](https://wakatime.com/badge/github/Ethosa/nodesnim.svg)](https://wakatime.com/badge/github/Ethosa/nodesnim) [![test](https://github.com/Ethosa/nodesnim/workflows/test/badge.svg)](https://github.com/Ethosa/nodesnim/actions) [![channel icon](https://patrolavia.github.io/telegram-badge/follow.png)](https://t.me/nim1love) [![channel icon](https://patrolavia.github.io/telegram-badge/chat.png)](https://t.me/nodesnim)

Stable version - 0.4.2

Install

  1. Install Nodesnim

    • Stable:

      nimble install nodesnim@#master
      
      • Nightly: bash nimble install nodesnim@#nightly
  2. Install dependencies

    • Linux (tested on Ubuntu and Mint):
      • sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
    • Windows / MacOS:

Features

  • Godot-like node system.
  • Runtime scene loader.
  • Powerful node build system using YML-like syntax.
  • Stylesheets (CSS-like).
  • Android-like drawables.
  • Customizable GUI themes.
  • Simple usage ```nim import nodesnim

Window("Hello, world!")

build:

- Scene scene:
  - Label hello:
    call:
      setSizeAnchor(1, 1)
      setTextAlign(0.5, 0.5, 0.5, 0.5)
      setText("Hello, world!")
      setBackgroundColor(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 |Graphics | |:--: |:--: |:--: | :--: |:--: |:--: | |Anchor |Node |Control |Node2D |Node3D |Drawable | |Color |Canvas |ColorRect |Sprite |GeometryInstance|GradientDrawable| |Font |Scene |TextureRect |AnimatedSprite |Camera3D | | |Enums |AudioStreamPlayer|Label |YSort |Sprite3D | | |Exceptions |AnimationPlayer |Button |CollisionShape2D| | | |Image | |EditText |Camera2D | | | |Input | |Box |TileMap | | | |Rect2 | |HBox | | | | |Vector2 | |VBox | | | | |Circle2 | |GridBox | | | | |Polygon2 | |Scroll | | | | |AudioStream | |ProgressBar | | | | |Animation | |Slider | | | | |Vector3 | |Popup | | | | |SceneBuilder| |TextureButton | | | | |StyleSheet | |TextureProgressBar| | | | |TileSet | |Counter | | | | |ChartData | |Switch | | | | |Scripts | |SubWindow | | | | |Scene loader| |CheckBox | | | | | | |ToolTip | | | | | | |Chart | | | |

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. Static linking SDL2
Also use niminst tool for generate an installer

  • 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

|[Wiki][]|[Examples][]|[Docs][]|[Tests][]| |--------|------------|--------|---------|

Stargazers over time