| 188 |
188 |
| 189 static void fps_counter_tie_to_corner(AscBehavior *behavior) { |
189 static void fps_counter_tie_to_corner(AscBehavior *behavior) { |
| 190 // TODO: this should be replaced with some sort of UI layout manager |
190 // TODO: this should be replaced with some sort of UI layout manager |
| 191 AscSceneNode *node = behavior->node; |
191 AscSceneNode *node = behavior->node; |
| 192 if (asc_test_flag(node->flags, ASC_SCENE_NODE_GRAPHICS_UPDATED) || asc_active_window->resized) { |
192 if (asc_test_flag(node->flags, ASC_SCENE_NODE_GRAPHICS_UPDATED) || asc_active_window->resized) { |
| |
193 // TODO: this is visually wrong for one frame |
| |
194 // instead there should be alignment settings with which we can control if (0,0) is in top left or bottom left corner |
| 193 asc_scene_node_set_position2f(node, ASC_VEC2F(10, |
195 asc_scene_node_set_position2f(node, ASC_VEC2F(10, |
| 194 asc_active_window->rect.size.height - ((AscText*)node)->dimension.height - 10 |
196 asc_active_window->rect.size.height - ((AscText*)node)->dimension.height - 10 |
| 195 )); |
197 )); |
| 196 } |
198 } |
| 197 } |
199 } |