diff options
Diffstat (limited to 'test/gui/group.c')
-rw-r--r-- | test/gui/group.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/test/gui/group.c b/test/gui/group.c index e3d25f3..555c246 100644 --- a/test/gui/group.c +++ b/test/gui/group.c | |||
@@ -7,9 +7,30 @@ static void test_group() { | |||
7 | Window window; | 7 | Window window; |
8 | window_init(&window, 1000, 512, "Coucou"); | 8 | window_init(&window, 1000, 512, "Coucou"); |
9 | window_create(&window); | 9 | window_create(&window); |
10 | window.group_buttons->component.print_method(window.group_pictureframe); | 10 | |
11 | MLV_wait_seconds(5); | 11 | Button button1; |
12 | window_free(&window); | 12 | Button button2; |
13 | Button button3; | ||
14 | |||
15 | button_init(&button1, "OK", 10, 500, 256, button_click_test); | ||
16 | button_init(&button2,"Bouton magique",10, 500,290, NULL); | ||
17 | button_init(&button3,"Très lonnggggg boooouttttooooon",10,0,0,button_click_test); | ||
18 | |||
19 | window_add_button(&window,&button1); | ||
20 | window_add_button(&window,&button2); | ||
21 | window_add_button(&window,&button3); | ||
22 | |||
23 | window_print_buttons(&window); | ||
24 | int mouse_x; | ||
25 | int mouse_y; | ||
26 | while(1){ | ||
27 | if (MLV_get_mouse_button_state(MLV_BUTTON_LEFT) == MLV_PRESSED) { | ||
28 | MLV_get_mouse_position(&mouse_x, &mouse_y); | ||
29 | group_click_handler(mouse_x,mouse_y,&(window.group_buttons->component)); | ||
30 | } | ||
31 | } | ||
32 | /*MLV_wait_seconds(15); | ||
33 | window_free(&window);*/ | ||
13 | } | 34 | } |
14 | 35 | ||
15 | int main() { | 36 | int main() { |