summaryrefslogtreecommitdiff
path: root/test/gui/group.c
diff options
context:
space:
mode:
authorAdam NAILI2017-12-31 17:52:59 +0100
committerAdam NAILI2017-12-31 17:52:59 +0100
commit3e6c3cea17042e83d8e48b87abd89c617a2f70f3 (patch)
tree0d6b22c672e670daa3cb464668500535af0ee988 /test/gui/group.c
parente275a679a1fb9377dd1a74329420ce6e95a03da3 (diff)
parentf1d17a0bb9d1ba98cc94488ecbdb539f123b33ab (diff)
downloadmorpher-3e6c3cea17042e83d8e48b87abd89c617a2f70f3.tar.gz
Merge remote-tracking branch 'origin/gui'
Diffstat (limited to 'test/gui/group.c')
-rw-r--r--test/gui/group.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/gui/group.c b/test/gui/group.c
new file mode 100644
index 0000000..7dbf80c
--- /dev/null
+++ b/test/gui/group.c
@@ -0,0 +1,39 @@
1#include <gui/group.h>
2#include <gui/window.h>
3#include "MLV/MLV_all.h"
4
5
6static void test_group() {
7 /*Window window;
8 window_init(&window, 1000, 512, "Coucou");
9 window_create(&window);
10
11 Button button1;
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, button_click_test);
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);*/
34}
35
36int main() {
37 test_group();
38 return 0;
39} \ No newline at end of file