test/snake.c

changeset 59
764fbb013252
parent 58
26ebb2f1e6e6
child 60
3954c551ded3
--- a/test/snake.c	Fri Apr 12 22:03:15 2024 +0200
+++ b/test/snake.c	Fri Apr 12 22:22:07 2024 +0200
@@ -49,7 +49,7 @@
 static void create_fps_counter(void) {
     asc_set_font(asc_font(ASC_FONT_REGULAR, 24));
     asc_ink_rgb(255, 0, 0);
-    AscSceneNode* node = asc_text(10, 10, NULL);
+    AscSceneNode* node = asc_text( .x = 10, .y = 10 );
     asc_scene_add_behavior(node, update_fps_counter);
     asc_add_ui_node(node);
 }
@@ -70,7 +70,7 @@
 static void create_score_counter(void) {
     asc_set_font(asc_font(ASC_FONT_BOLD, 14));
     asc_ink_rgb(0, 255, 0);
-    AscSceneNode* node = asc_text(0, 0, "Score: 0");
+    AscSceneNode* node = asc_text( .x = 0, .y = 0, .text = "Score: 0" );
     asc_scene_add_behavior(node, update_score_counter);
     asc_add_ui_node(node);
 }

mercurial