Jelajahi Sumber

fix hello world example

Ethosa 3 tahun lalu
induk
melakukan
5b044b209b
2 mengubah file dengan 5 tambahan dan 5 penghapusan
  1. 4 4
      README.md
  2. 1 1
      examples/hello_world/main.nim

+ 4 - 4
README.md

@@ -39,8 +39,8 @@
   import nodesnim
 
   Window("Hello, world!")
-  
-  
+
+
   build:
     - Scene scene:
       name: "Main"
@@ -48,8 +48,8 @@
         call setSizeAnchor(1, 1)
         call setTextAlign(0.5, 0.5, 0.5, 0.5)
         call setText("Hello, world!")
-        background_color: Color(31, 45, 62)
-  
+        call setBackgroundColor(Color(31, 45, 62))
+
   addMainScene(scene)
   windowLaunch()
   

+ 1 - 1
examples/hello_world/main.nim

@@ -10,7 +10,7 @@ build:
       call setSizeAnchor(1, 1)
       call setTextAlign(0.5, 0.5, 0.5, 0.5)
       call setText("Hello, world!")
-      background_color: Color(31, 45, 62)
+      call setBackgroundColor(Color(31, 45, 62))
 
 addMainScene(scene)
 windowLaunch()