The NEW Pong Game  V13.2.1
An interesting implemnettaion of the pong game
page_2b_1t.hpp
Go to the documentation of this file.
1 
8 #ifndef NOTICE_MENU_HPP
9 #define NOTICE_MENU_HPP
10 
11 #include <SDL.h>
12 #include <SDL_ttf.h>
13 #include <SDL_mixer.h>
14 
23 {
24 private:
25  SDL_Texture *texture_menu;
26  SDL_Renderer *renderer;
27  TTF_Font *police;
29  SDL_Rect button_lets_go;
30  SDL_Rect button_back;
32  bool next_view;
33  bool go_back;
35  int notice_id;
37 public:
43  page_2b_1t(SDL_Renderer *_renderer, TTF_Font *font);
44 
48  ~page_2b_1t();
49 
55  bool action_handler(const SDL_Event &event);
56 
61  bool get_next_view() const { return next_view; }
62 
67  bool get_go_back() const { return go_back; }
68 
73  int get_notice_id() const { return notice_id; }
74 
79  void set_notice_id(int _id) { notice_id = _id; }
80 
84  void render_object();
85 };
86 
87 #endif // NOTICE_MENU_HPP
Notice screen with 2 buttons and 1 title.
Definition: page_2b_1t.hpp:23
SDL_Renderer * renderer
Definition: page_2b_1t.hpp:26
void render_object()
Renders the notice screen.
Definition: page_2b_1t.cpp:93
int get_notice_id() const
Gets the current notice ID.
Definition: page_2b_1t.hpp:73
TTF_Font * police
Definition: page_2b_1t.hpp:27
SDL_Rect button_back
Definition: page_2b_1t.hpp:30
bool action_handler(const SDL_Event &event)
Handles events for the menu buttons.
Definition: page_2b_1t.cpp:61
page_2b_1t(SDL_Renderer *_renderer, TTF_Font *font)
Constructor for the notice page.
Definition: page_2b_1t.cpp:21
~page_2b_1t()
Destructor for the notice page.
Definition: page_2b_1t.cpp:44
SDL_Texture * texture_menu
Definition: page_2b_1t.hpp:25
int notice_id
Definition: page_2b_1t.hpp:35
bool go_back
Definition: page_2b_1t.hpp:33
SDL_Rect button_lets_go
Definition: page_2b_1t.hpp:29
void set_notice_id(int _id)
Sets the notice ID to display.
Definition: page_2b_1t.hpp:79
bool get_next_view() const
Checks if the "Next" button was pressed.
Definition: page_2b_1t.hpp:61
bool get_go_back() const
Checks if the "Back" button was pressed.
Definition: page_2b_1t.hpp:67
bool next_view
Definition: page_2b_1t.hpp:32
TTF_Font * font
Definition: letter_test.cpp:24