generated from NaBuchholz/ft_template_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor[utils.c]: key and mouse event handling
- Loading branch information
Nathalia Vitoria Buchholz
committed
Feb 20, 2025
1 parent
db2c01d
commit 38ab4fa
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* utils.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: nbuchhol <nbuchhol@student.42.fr> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2025/02/20 00:45:00 by nbuchhol #+# #+# */ | ||
/* Updated: 2025/02/20 01:32:55 by nbuchhol ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "../includes/so_long.h" | ||
|
||
int key_handle(int keycode) | ||
{ | ||
if (keycode == 65307) | ||
exit(0); | ||
return (0); | ||
} | ||
|
||
int mouse_handle(t_classMlx *mlx) | ||
{ | ||
mlx_destroy_window(mlx->mlx, mlx->win); | ||
exit(0); | ||
return (0); | ||
} |