src/text.c

changeset 36
e26b4ac1661c
parent 33
e7ddb52facd3
child 37
8a8cc6725b48
     1.1 --- a/src/text.c	Wed Mar 06 23:13:06 2024 +0100
     1.2 +++ b/src/text.c	Wed Mar 06 23:38:17 2024 +0100
     1.3 @@ -99,7 +99,7 @@
     1.4      SDL_FreeSurface(surface);
     1.5  }
     1.6  
     1.7 -AscText *asc_text(int x, int y, char const *text) {
     1.8 +AscSceneNode *asc_text(int x, int y, char const *text) {
     1.9      AscText *node = calloc(1, sizeof(AscText));
    1.10      if (node == NULL) {
    1.11          asc_error("Out of memory.");
    1.12 @@ -118,9 +118,7 @@
    1.13          node->text = strdup(text);
    1.14      }
    1.15  
    1.16 -    asc_scene_add(&asc_context.active_window->ui, &node->base);
    1.17 -
    1.18 -    return node;
    1.19 +    return &node->base;
    1.20  }
    1.21  
    1.22  void asc_text_free(AscText *node) {

mercurial