The Nim GUI/2D framework based on OpenGL and SDL2.
|
преди 3 години | |
---|---|---|
.github | преди 3 години | |
engine | преди 3 години | |
examples | преди 3 години | |
screenshots | преди 4 години | |
src | преди 3 години | |
tests | преди 3 години | |
.gitignore | преди 4 години | |
CODE_OF_CONDUCT.md | преди 4 години | |
LICENSE | преди 5 години | |
README.md | преди 3 години | |
nodesnim.nimble | преди 3 години |
Install Nodesnim
Stable:
nimble install nodesnim
bash
nimble install nodesnim@#nightly
Install dependencies
sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
.nimble/bin/
folderWindow("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()
```
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 | | | | |TileSet | |TextureProgressBar| | | | | | |Counter | | | | | | |Switch | | | | | | |SubWindow | | | | | | |CheckBox | | | |
For use debug mode you should compile with -d:debug
or --define:debug
, e.g. nim c -r -d:debug main.nim
.
Use the Nim compiler user guide
for export to the other OS.
Static linking SDL2 (or compile with -d:static_sdl2
-> tested on Windows)
nim c -d:mingw -d:release --opt:speed --noNimblePath file.nim