From 44e987c8521a99519350a42292bcfcd28451dcbd Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 20 Dec 2021 10:26:12 +0100 Subject: Async load images --- src/mgui/button.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mgui/button.c') diff --git a/src/mgui/button.c b/src/mgui/button.c index 00db361..d77750d 100644 --- a/src/mgui/button.c +++ b/src/mgui/button.c @@ -12,6 +12,10 @@ static int min_int(int a, int b) { } mgui_button* mgui_button_create(const char *str, size_t size, unsigned char character_size) { + /* TODO: Make this work for character size >= 100 */ + if(character_size >= 100) + character_size = 99; + mgui_button *button = mgui_alloc(sizeof(mgui_button)); mgui_widget_init(&button->widget, MGUI_WIDGET_BUTTON); button->background.position = (mgl_vec2f){ 0.0f, 0.0f }; -- cgit v1.2.3