-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_menu.c
53 lines (48 loc) · 1.96 KB
/
ft_menu.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_menu.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rerayyad <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/14 07:16:56 by rerayyad #+# #+# */
/* Updated: 2023/05/19 15:45:45 by rerayyad ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void ft_menu_instructions(t_canvas *mlx)
{
int n;
char *menu;
n = 10;
menu = "Welcome to FdF";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 48, 5, ORANGE, menu);
menu = "::: Instructions ::: ";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 30, n += 80, WHITE, menu);
menu = "Camera mouvment: W,S,A,D";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 60, M_TEXT, menu);
menu = "Switch projection: Tab";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 40, M_TEXT, menu);
menu = "Panoramic view: Space";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 40, M_TEXT, menu);
menu = "Rotate: 4,6,2,8";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 40, M_TEXT, menu);
menu = "Elevation: ] / [";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 40, M_TEXT, menu);
menu = "Zoom: + / -";
mlx_string_put(mlx->mlx_ptr, mlx->win_ptr, 18, n += 40, M_TEXT, menu);
}
void ft_menu(t_canvas *mlx)
{
int i;
int j;
i = 0;
while (i < (X / 5))
{
j = 0;
while (j < Y)
mlx_pixel_put(mlx->mlx_ptr, mlx->win_ptr, i, j++, BLACK);
i++;
}
ft_menu_instructions(mlx);
}