Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.35 KB | None | 0 0
  1. /*
  2. ** EPITECH PROJECT, 2018
  3. ** null
  4. ** File description:
  5. ** nul
  6. */
  7.  
  8. #include "my.h"
  9.  
  10. void fill_hud_button(my_w_t *window)
  11. {
  12.     //button shop
  13.     window->hud->button[0] = button_initialise(POS_SHOP,
  14.     SIZE_SHOP_BUTTON, print_hello);
  15.     window->hud->button[0] = next_button_initialise(window->hud->button[0],
  16.     window->hud->shop_texture, window->hud->shop_fly_over);
  17.     // button home
  18.     window->hud->button[1] = button_initialise((sfVector2f){300, 500},
  19.     SIZE_SHOP_BUTTON, print_bye);
  20.     window->hud->button[1] = next_button_initialise(window->hud->button[1],
  21.     window->hud->home, window->hud->home_fly_over);
  22.     window->hud->button[2] = button_initialise((sfVector2f){1400, 50},
  23.     SIZE_SHOP_BUTTON, print_hello);
  24.     window->hud->button[2] = next_button_initialise(window->hud->button[2],
  25.     window->hud->exit_sprite, window->hud->exit_fly_over);
  26.     window->hud->button[3] = NULL;
  27.  
  28. }
  29.  
  30. void fill_all_texture_of_hud(my_w_t *window)
  31. {
  32.     window->hud->shop_texture = sfTexture_createFromFile(SHOP_IMG, NULL);
  33.     window->hud->shop_fly_over = sfTexture_createFromFile(SHOW_IMG_FLY, NULL);
  34.     window->hud->home = sfTexture_createFromFile(HOME_IMG, NULL);
  35.     window->hud->home_fly_over = sfTexture_createFromFile(HOME_IMG_FLY, NULL);
  36.     window->hud->exit_sprite = sfTexture_createFromFile(EXIT_IMG, NULL);
  37.     window->hud->exit_fly_over = sfTexture_createFromFile(EXIT_IMG_FLY, NULL);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement