-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.c
71 lines (65 loc) · 3.05 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* ************************************************************************** */
/* */
/* :::::::: */
/* menu.c :+: :+: */
/* +:+ */
/* By: ihering- <ihering-@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2019/07/21 15:09:44 by ihering- #+# #+# */
/* Updated: 2019/08/01 15:25:26 by ihering- ######## odam.nl */
/* */
/* ************************************************************************** */
#include "fractol.h"
void ft_menu(t_fractol *f)
{
int i;
i = 0;
mlx_string_put(f->mlx, f->win, 30, i += 20, 0x9B9B9B, "WELCOME TO FRACTOL");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Controls:");
if (f->fractol == 0)
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "You Choose \
the Mandelbrot Set");
if (f->fractol == 2)
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "You Choose \
the Burning Ship Set");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Move: Use Arrows");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Zoom: Scroll");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "R: Reset");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "ESC: Quit");
mlx_string_put(f->mlx, f->win, 1150, i -= 180, 0x9B9B9B, "Colors:");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "S: Color Set \
Standard");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "P: Color Set \
Psychedelic");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "B: Color Set \
Brazil");
}
void ft_juliamenu(t_fractol *f)
{
int i;
i = 0;
mlx_string_put(f->mlx, f->win, 30, i += 20, 0x9B9B9B, "WELCOME TO FRACTOL");
mlx_string_put(f->mlx, f->win, 30, i += 20, 0x9B9B9B, "You Choose \
the Julia Set");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Controls:");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Move: Use Arrows");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Zoom: Scroll");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "Left Button: \
Lock / Unlock");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "R: Reset");
mlx_string_put(f->mlx, f->win, 30, i += 30, 0x9B9B9B, "ESC: Quit");
mlx_string_put(f->mlx, f->win, 1150, i -= 200, 0x9B9B9B, "Colors:");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "S: Color Set \
Standard");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "P: Color Set \
Psychedelic");
mlx_string_put(f->mlx, f->win, 1100, i += 30, 0x9B9B9B, "B: Color Set \
Brazil");
}
void writemenu(t_fractol *f)
{
if (f->fractol == 0 || f->fractol == 2)
ft_menu(f);
else if (f->fractol == 1)
ft_juliamenu(f);
}