Skip to content

Commit

Permalink
Update text areas if alignment is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Jul 28, 2024
1 parent 133b755 commit 7843826
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/media/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,7 @@ ctr_object* ctr_img_text_align(ctr_object* myself, ctr_argument* argumentList) {
y = image->h - y;
y -= lineHeight;
image->paddingy = y;
ctr_internal_img_render_text(myself);
return myself;
}

Expand Down Expand Up @@ -3013,7 +3014,6 @@ void ctr_internal_img_render_text(ctr_object* myself) {
CtrMediaEdCache[q].text = buff;
CtrMediaEdCache[q].state = state;
}

SDL_BlitSurface(text,NULL,dst,&t);
TTF_SizeUTF8(font, buff, &text_width, NULL);
TTF_SizeUTF8(font, "X", NULL, &text_height); // deze kunnen we cachen
Expand Down Expand Up @@ -4296,8 +4296,8 @@ void begin(){
#ifdef FFI
CtrMediaDataBlob = ctr_media_new(CtrStdObject, NULL);
CtrMediaDataBlob->link = CtrStdObject;
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( "nieuw:" ), &ctr_blob_new_set);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( "tekst" ), &ctr_blob_tostring);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( CTR_DICT_NEW_SET ), &ctr_blob_new_set);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( CTR_DICT_TOSTRING ), &ctr_blob_tostring);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( "vul:" ), &ctr_blob_fill);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( "utf8:" ), &ctr_blob_utf8_set);
ctr_internal_create_func(CtrMediaDataBlob, ctr_build_string_from_cstring( "nieuw:type:" ), &ctr_blob_new_set_type);
Expand Down

0 comments on commit 7843826

Please sign in to comment.