Exemplo n.º 1
0
void a3d_bulletbox_textWrapx(a3d_bulletbox_t* self,
                             int wrapx)
{
	assert(self);

	a3d_text_wrapx(self->text, wrapx);
}
Exemplo n.º 2
0
static void a3d_textbox_printText(a3d_textbox_t* self,
                                  const char* string)
{
	assert(self);
	assert(string);
	LOGD("debug string=%s", string);

	a3d_widget_t* widget = (a3d_widget_t*) self;
	a3d_text_t* text = a3d_text_new(widget->screen,
	                                0,
	                                self->anchor,
	                                self->style_border,
	                                self->style_line,
	                                self->style_text,
	                                &(self->color_fill),
	                                &(self->color_line),
	                                &(self->color_text),
	                                self->max_len,
	                                NULL, NULL);
	if(text == NULL)
	{
		return;
	}
	a3d_text_wrapx(text, self->text_wrapx);

	a3d_listbox_t* listbox = (a3d_listbox_t*) self;
	if(a3d_list_enqueue(listbox->list, (const void*) text) == 0)
	{
		goto fail_enqueue;
	}

	a3d_text_printf(text, "%s", string);

	// success
	return;

	// failure
	fail_enqueue:
		a3d_text_delete(&text);
}