test/snake/snake.c

changeset 116
bfb2a7d62047
parent 114
5b91bbab1ac0
equal deleted inserted replaced
115:e5f8c99b0987 116:bfb2a7d62047
70 } 70 }
71 // tie to bottom right of the screen 71 // tie to bottom right of the screen
72 if (asc_test_flag(node->flags, ASC_SCENE_NODE_GRAPHICS_UPDATED) 72 if (asc_test_flag(node->flags, ASC_SCENE_NODE_GRAPHICS_UPDATED)
73 || asc_active_window->resized) { 73 || asc_active_window->resized) {
74 asc_vec2u bottom_right = asc_active_window->dimensions; 74 asc_vec2u bottom_right = asc_active_window->dimensions;
75 // TODO: replace scale with asc_text_get_size() 75 asc_vec2u text_size = ((AscText*)node)->dimension;
76 asc_vec3f text_size = node->scale;
77 asc_set_position2d( 76 asc_set_position2d(
78 node, 77 node,
79 (int)bottom_right.x - (int)text_size.width - 10, 78 (int)bottom_right.x - (int)text_size.width - 10,
80 (int)bottom_right.y - (int)text_size.height - 10 79 (int)bottom_right.y - (int)text_size.height - 10
81 ); 80 );

mercurial