The NEW Pong Game V13.2.1
An interesting implemnettaion of the pong game
Loading...
Searching...
No Matches
page_3b.hpp
Go to the documentation of this file.
1
8#ifndef PAUSE_MENU_HPP
9#define PAUSE_MENU_HPP
10
11#include <SDL.h>
12#include <SDL_ttf.h>
13#include <SDL_mixer.h>
14
23{
24public:
30 page_3b(SDL_Renderer *renderer, TTF_Font *font);
31
35 ~page_3b();
36
40 void render_object();
41
47 bool action_handler(const SDL_Event &event);
48
53 bool ShouldResume() const { return mResume; }
54
59 bool ShouldSave() const { return mSave; }
60
65 bool get_exit_mode() const { return mExit; }
66
71 void set_mode_type(int type) { mode_type = type; }
72
77 int get_mode_type() const { return mode_type; }
78
79private:
80 SDL_Renderer *renderer;
81 TTF_Font *police;
82 bool mResume;
83 bool mSave;
84 bool mExit;
87 SDL_Rect mResumeButton;
88 SDL_Rect mSaveButton;
89 SDL_Rect button_exit;
92};
93
94#endif
Pause menu with 3 buttons.
Definition page_3b.hpp:23
SDL_Renderer * renderer
Definition page_3b.hpp:80
SDL_Rect mSaveButton
Definition page_3b.hpp:88
bool get_exit_mode() const
Checks if the exit button was pressed.
Definition page_3b.hpp:65
void set_mode_type(int type)
Sets the current game mode type.
Definition page_3b.hpp:71
~page_3b()
Destructor for pause menu.
Definition page_3b.cpp:33
TTF_Font * police
Definition page_3b.hpp:81
SDL_Rect button_exit
Definition page_3b.hpp:89
void render_object()
Renders the pause menu.
Definition page_3b.cpp:40
bool mSave
Definition page_3b.hpp:83
bool ShouldResume() const
Checks if the resume button was pressed.
Definition page_3b.hpp:53
SDL_Rect mResumeButton
Definition page_3b.hpp:87
bool action_handler(const SDL_Event &event)
Handles events for the menu buttons.
Definition page_3b.cpp:75
int selected_button
Definition page_3b.hpp:85
int get_mode_type() const
Gets the current game mode type.
Definition page_3b.hpp:77
page_3b(SDL_Renderer *renderer, TTF_Font *font)
Constructor for pause menu.
Definition page_3b.cpp:21
bool ShouldSave() const
Checks if the save button was pressed.
Definition page_3b.hpp:59
int mode_type
Definition page_3b.hpp:91
bool mExit
Definition page_3b.hpp:84
bool mResume
Definition page_3b.hpp:82
TTF_Font * font
Definition letter_test.cpp:24