src/text.c

changeset 193
ddf690c0b36b
parent 189
2c063b225183
child 194
7985c3b64460
equal deleted inserted replaced
192:160f3300f6b7 193:ddf690c0b36b
124 asc_text_update(node); 124 asc_text_update(node);
125 125
126 return node; 126 return node;
127 } 127 }
128 128
129 // TODO: maybe we should prefer a clean signature and molest the caller with the cast
130 void asc_text_printf( 129 void asc_text_printf(
131 AscSceneNode *node, 130 AscText *text_node,
132 const char *format, 131 const char *format,
133 ... 132 ...
134 ) { 133 ) {
135 AscText *text_node = (AscText*) node;
136 va_list ap; 134 va_list ap;
137 va_start(ap, format); 135 va_start(ap, format);
138 cx_vsprintf( 136 cx_vsprintf(
139 &text_node->text.ptr, 137 &text_node->text.ptr,
140 &text_node->text.length, 138 &text_node->text.length,
141 format, 139 format,
142 ap 140 ap
143 ); 141 );
144 va_end(ap); 142 va_end(ap);
145 asc_node_update(node); 143 asc_node_update((AscSceneNode*)text_node);
146 } 144 }
147 145

mercurial