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

Ethosa 9305c5c4ce refactor Slider node 3 年之前
.github 359da2e55a add margin, fix padding :eyes: 3 年之前
engine e49bfd2b41 small update 3 年之前
examples 53d8cbde68 add padding 3 年之前
screenshots 371453ec7d add screenshots folder. 4 年之前
src 9305c5c4ce refactor Slider node 3 年之前
tests 9305c5c4ce refactor Slider node 3 年之前
.gitignore 609d9f42f4 add CollisionShape2D and debug mode. 4 年之前
CODE_OF_CONDUCT.md 621e4f41ee Create CODE_OF_CONDUCT.md 4 年之前
LICENSE eb23f4d1f3 Initial commit 5 年之前
README.md 9305c5c4ce refactor Slider node 3 年之前
nodesnim.nimble 53d8cbde68 add padding 3 年之前

README.md

Nodesnim

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

Open Source Love Nim language-plastic License time tracker test

Stable version - 0.3.0

Install

  1. Install Nodesnim

    • Stable:

      nimble install nodesnim
      
      • 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.
  • Build nodes with YML-like syntax.
  • Stylesheets (CSS-like).
  • 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!")
    call 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 | | | |Enums |AudioStreamPlayer|Label |YSort | | | |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 | | | | | | |Switch | | | | | | |SubWindow | | | | | | |CheckBox | | | |

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

  • 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