Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
fix 👀
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed Nov 3, 2021
1 parent e9a4a85 commit 69e5e11
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/roguelike/main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import
random

Window("Roguelike", 480, 240)
env.setBackgroundColor(Color("#e0f8cf"))
env.background_color = "#e0f8cf"

var
tileset = TileSet("assets/colored_tilemap.png", Vector2(16, 16), GL_RGBA)
Expand Down
4 changes: 3 additions & 1 deletion src/nodesnim/environment.nim
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ proc `delay=`*(env: EnvironmentRef, value: int) =
proc `background_color`*(env: EnvironmentRef): ColorRef = env.color_value
proc `background_color=`*(env: EnvironmentRef, value: ColorRef) =
env.color_value = value
proc `background_color=`*(env: EnvironmentRef, value: uint32 | string) =
proc `background_color=`*(env: EnvironmentRef, value: uint32) =
env.color_value = Color(value)
proc `background_color=`*(env: EnvironmentRef, value: string) =
env.color_value = Color(value)

proc `grabbed`*(env: EnvironmentRef): bool = env.grabbed_value
Expand Down
3 changes: 2 additions & 1 deletion tests/test1.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ suite "Work with Window":
env.background_color = Color(1, 0.6, 1) # window background color.
env.delay = 1000 div 120 # 120 frames per second.
env.brightness = 0.0
env.resizable = false
env.resizable = true
env.bordered = true
env.screen_mode = SCREEN_MODE_EXPANDED

test "Setup window":
build: # Node builder
Expand Down
1 change: 1 addition & 0 deletions tests/test3.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ suite "Work with Control nodes.":
- Scene second_scene
addMainScene(main)
addScene(second_scene)
env.screen_mode = SCREEN_MODE_EXPANDED


test "Register events":
Expand Down

0 comments on commit 69e5e11

Please sign in to comment.