summaryrefslogtreecommitdiff
path: root/src/gui/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/button.c')
-rw-r--r--src/gui/button.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/button.c b/src/gui/button.c
index fbdc172..96cbd9a 100644
--- a/src/gui/button.c
+++ b/src/gui/button.c
@@ -33,7 +33,7 @@ void button_click_test(int x, int y, Component *parameterSelf) {
33 assert(y >= 0); 33 assert(y >= 0);
34 assert(parameterSelf != NULL); 34 assert(parameterSelf != NULL);
35 Button *self = (Button *) parameterSelf; 35 Button *self = (Button *) parameterSelf;
36 if (button_is_selected(x, y, self)) { 36 if (button_is_selected(x, y, self) && self->component.activated) {
37 printf("OK\n"); 37 printf("OK\n");
38 } 38 }
39} 39}
@@ -51,6 +51,7 @@ button_init(Button *button, const char *text, int sizeInterligne, int x_pos, int
51 MLV_get_size_of_adapted_text_box(text, sizeInterligne, &button->component.width, &button->component.height); 51 MLV_get_size_of_adapted_text_box(text, sizeInterligne, &button->component.width, &button->component.height);
52 button->component.x_pos = x_pos; 52 button->component.x_pos = x_pos;
53 button->component.y_pos = y_pos; 53 button->component.y_pos = y_pos;
54 button->component.activated = true;
54 button->component.print_method = button_print; 55 button->component.print_method = button_print;
55 button->component.click_handler = clickHandler; 56 button->component.click_handler = clickHandler;
56} 57}