-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_menu_text.c
55 lines (51 loc) · 1.95 KB
/
init_menu_text.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
/*
** EPITECH PROJECT, 2022
** my hunter
** File description:
** my hunter
*/
#include "include/my_hunter.h"
void init_option_button(menu_t *menu)
{
menu->text_init[OPTION].font =
sfFont_createFromFile("assets/doom_font.ttf");
menu->text_init[OPTION].text = sfText_create();
set_text_orange(menu, OPTION);
menu->text_init[OPTION].pos.x = 665;
menu->text_init[OPTION].pos.y = 420;
sfText_setFont(menu->text_init[OPTION].text, menu->text_init[OPTION].font);
sfText_setCharacterSize(menu->text_init[OPTION].text, 100);
sfText_setPosition(menu->text_init[OPTION].text,
menu->text_init[OPTION].pos);
sfText_setString(menu->text_init[OPTION].text, "OPTION" );
}
void init_play_button(menu_t *menu)
{
menu->text_init[PLAY_BTN].font =
sfFont_createFromFile("assets/doom_font.ttf");
menu->text_init[PLAY_BTN].text = sfText_create();
set_text_orange(menu, PLAY_BTN);
menu->text_init[PLAY_BTN].pos.x = 1020;
menu->text_init[PLAY_BTN].pos.y = 340;
sfText_setFont(menu->text_init[PLAY_BTN].text,
menu->text_init[PLAY_BTN].font);
sfText_setCharacterSize(menu->text_init[PLAY_BTN].text, 100);
sfText_setPosition(menu->text_init[PLAY_BTN].text,
menu->text_init[PLAY_BTN].pos);
sfText_setString(menu->text_init[PLAY_BTN].text, "Play !" );
}
void init_hunter_logo(menu_t *menu)
{
menu->text_init[LOGO_HUNTER].font =
sfFont_createFromFile("assets/doom_font.ttf");
menu->text_init[LOGO_HUNTER].text = sfText_create();
menu->text_init[LOGO_HUNTER].pos.x = 260;
menu->text_init[LOGO_HUNTER].pos.y = 360;
sfText_setFont(menu->text_init[LOGO_HUNTER].text,
menu->text_init[LOGO_HUNTER].font);
sfText_setCharacterSize(menu->text_init[LOGO_HUNTER].text, 60);
sfText_setPosition(menu->text_init[LOGO_HUNTER].text,
menu->text_init[LOGO_HUNTER].pos);
sfText_setColor(menu->text_init[LOGO_HUNTER].text, sfBlack);
sfText_setString(menu->text_init[LOGO_HUNTER].text, "-Hunter-" );
}