53 asc_scene_add_behavior(node, update_fps_counter); |
53 asc_scene_add_behavior(node, update_fps_counter); |
54 asc_add_ui_node(node); |
54 asc_add_ui_node(node); |
55 } |
55 } |
56 |
56 |
57 static void update_score_counter(AscSceneNode *node) { |
57 static void update_score_counter(AscSceneNode *node) { |
58 // tie to bottom left of the screen |
58 // tie to bottom right of the screen |
59 if (asc_window_active->resized) { |
59 if (asc_window_active->resized) { |
60 asc_vec2i bottom_left = asc_window_active->dimensions; |
60 asc_vec2i bottom_right = asc_window_active->dimensions; |
61 asc_vec2i scale = asc_get_scale2d(node); |
61 asc_vec2i scale = asc_get_scale2d(node); |
62 asc_set_position2d( |
62 asc_set_position2d( |
63 node, |
63 node, |
64 bottom_left.x - scale.width - 10, |
64 bottom_right.x - scale.width - 10, |
65 bottom_left.y - scale.height - 10 |
65 bottom_right.y - scale.height - 10 |
66 ); |
66 ); |
67 } |
67 } |
68 } |
68 } |
69 |
69 |
70 static void create_score_counter(void) { |
70 static void create_score_counter(void) { |