multi key action

This commit is contained in:
hugogogo
2022-03-23 14:36:20 +01:00
parent 95bd304708
commit f37f2891a4
4 changed files with 89 additions and 21 deletions

View File

@@ -9,6 +9,8 @@ int main(int ac, char **av)
// receive a keypress event
mlx_hook(game->win_ptr, 2, 1L << 0, keypress, game);
// receive a keyprelease event
mlx_hook(game->win_ptr, 3, 1L << 1, keyrelease, game);
// receive event when clicking the red button to close the window
mlx_hook(game->win_ptr, 17, 1L << 17, shut_down, game);
// infinite loop that waits for events to occurs