diff options
author | Adam NAILI | 2017-12-31 17:52:59 +0100 |
---|---|---|
committer | Adam NAILI | 2017-12-31 17:52:59 +0100 |
commit | 3e6c3cea17042e83d8e48b87abd89c617a2f70f3 (patch) | |
tree | 0d6b22c672e670daa3cb464668500535af0ee988 /test/gui/button.c | |
parent | e275a679a1fb9377dd1a74329420ce6e95a03da3 (diff) | |
parent | f1d17a0bb9d1ba98cc94488ecbdb539f123b33ab (diff) | |
download | morpher-3e6c3cea17042e83d8e48b87abd89c617a2f70f3.tar.gz |
Merge remote-tracking branch 'origin/gui'
Diffstat (limited to 'test/gui/button.c')
-rw-r--r-- | test/gui/button.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/gui/button.c b/test/gui/button.c new file mode 100644 index 0000000..df3e04d --- /dev/null +++ b/test/gui/button.c | |||
@@ -0,0 +1,30 @@ | |||
1 | #include <gui/group.h> | ||
2 | #include <gui/window.h> | ||
3 | #include <gui/button.h> | ||
4 | #include <gui/component.h> | ||
5 | #include "MLV/MLV_all.h" | ||
6 | |||
7 | |||
8 | static void test_button() { | ||
9 | /* Window window; | ||
10 | window_init(&window, 1000, 512, "Coucou"); | ||
11 | window_create(&window); | ||
12 | Button button1; | ||
13 | button_init(&button1, "OK", 10, 500, 256, button_click_test); | ||
14 | button1.component.print_method(&button1); | ||
15 | int mouse_x; | ||
16 | int mouse_y; | ||
17 | while (1) { | ||
18 | if (MLV_get_mouse_button_state(MLV_BUTTON_LEFT) == MLV_PRESSED) { | ||
19 | MLV_get_mouse_position(&mouse_x, &mouse_y); | ||
20 | button1.component.click_handler(mouse_x, mouse_y, &(button1.component)); | ||
21 | } | ||
22 | }*/ | ||
23 | /*MLV_wait_seconds(10); | ||
24 | window_free(&window);*/ | ||
25 | } | ||
26 | |||
27 | int main() { | ||
28 | test_button(); | ||
29 | return 0; | ||
30 | } \ No newline at end of file | ||