diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 15:12:52 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-09 15:12:52 +0100 |
commit | a1e2fbb1502564a7d49a47ca1949aeec83ea67b2 (patch) | |
tree | 36a4068779ca81b81d14281a36d338034c36917d /src/ft_click_close.c | |
parent | Smooth (diff) | |
download | 42-cub3d-a1e2fbb1502564a7d49a47ca1949aeec83ea67b2.tar.gz 42-cub3d-a1e2fbb1502564a7d49a47ca1949aeec83ea67b2.tar.bz2 42-cub3d-a1e2fbb1502564a7d49a47ca1949aeec83ea67b2.tar.xz 42-cub3d-a1e2fbb1502564a7d49a47ca1949aeec83ea67b2.tar.zst 42-cub3d-a1e2fbb1502564a7d49a47ca1949aeec83ea67b2.zip |
New function, trying to close properly
Diffstat (limited to '')
-rw-r--r-- | src/ft_click_close.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ft_click_close.c b/src/ft_click_close.c new file mode 100644 index 0000000..87c0bbf --- /dev/null +++ b/src/ft_click_close.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* LE - / */ +/* / */ +/* ft_click_close.c .:: .:/ . .:: */ +/* +:+:+ +: +: +:+:+ */ +/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */ +/* #+# #+ #+ #+# */ +/* Created: 2020/02/09 15:12:16 by rbousset #+# ## ## #+# */ +/* Updated: 2020/02/09 15:12:17 by rbousset ### #+. /#+ ###.fr */ +/* / */ +/* / */ +/* ************************************************************************** */ + +#include <libft.h> +#include <cub3d.h> +#include <mlx.h> +#include <stdlib.h> + +int + ft_click_close(int keycode, t_cub *clist) +{ + ft_printf("Button [%d] pressed\n", keycode); + if (keycode == 8800) + return (ft_exit(0, clist)); + return (0); +} |