Exemple #1
0
int		check_key_press(int keycode, t_mlx *mlx)
{
	mlx->key = keycode;
	if (mlx->menu == 1)
	{
		if (mlx->key == 126)
			press_up(mlx);
		if (mlx->key == 125)
			press_down(mlx);
		if (mlx->key == 124)
			press_right(mlx);
		if (mlx->key == 123)
			press_left(mlx);
		if (mlx->key >= 123 && mlx->key <= 126)
			mlx->move = 1;
	}
	return (0);
}
Exemple #2
0
void up_click_handler(ClickRecognizerRef recognizer, void *context)
{
    press_up();
}