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

Ethosa 8f2819a73b :eyes: há 3 anos atrás
.github 93e4060410 :eyes: há 3 anos atrás
engine cbb94669e6 add sphere :eyes: há 3 anos atrás
examples a4ff7805b0 fix git actions :eyes: há 3 anos atrás
screenshots 371453ec7d add screenshots folder. há 4 anos atrás
src 8f2819a73b :eyes: há 3 anos atrás
tests e84a65e72b add TileSet and TileMap há 3 anos atrás
.gitignore 609d9f42f4 add CollisionShape2D and debug mode. há 4 anos atrás
CODE_OF_CONDUCT.md 621e4f41ee Create CODE_OF_CONDUCT.md há 4 anos atrás
LICENSE eb23f4d1f3 Initial commit há 5 anos atrás
README.md 8f2819a73b :eyes: há 3 anos atrás
nodesnim.nimble f5f6f609d7 :eyes: há 3 anos atrás

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

Install

  1. Install Nodesnim

    • Stable: nimble install nodesnim or nimble install https://github.com/Ethosa/nodesnim.git
    • Nightly:

      git clone https://github.com/Ethosa/nodesnim/
      cd nodesnim
      git checkout nightly-0.X.X
      nimble install
      
      1. Install dependencies
      2. Linux (tested on Ubuntu and Mint):
      3. sudo apt install -y freeglut3 freeglut3-dev
      4. sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
      5. Windows / MacOS:
      6. SDL2
      7. SDL2_image
      8. SDL2_mixer
      9. SDL2_ttf
      10. freeGLUT
      11. Put Runtime binaries in the .nimble/bin/ folder

      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 | |VSlider | | | | |SceneBuilder| |Popup | | | | |StyleSheet | |TextureButton | | | | | | |TextureProgressBar| | | | | | |Counter | | | | | | |Switch | | | | | | |SubWindow | | | | | | |LineEdit | | | | | | |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 (or compile with -d:static_sdl2 -> tested on Windows)

  • 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][]| |--------|------------|--------|---------|