-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomeScreenUiHandler.cc
34 lines (25 loc) · 948 Bytes
/
HomeScreenUiHandler.cc
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
#include "HomeScreenUiHandler.hh"
#include "ScreenCommon.hh"
namespace pge {
HomeScreenUiHandler::HomeScreenUiHandler()
: IUiHandler("home")
{}
void HomeScreenUiHandler::initializeMenus(const int width,
const int height,
sprites::TexturePack & /*texturesLoader*/)
{
m_menu = generateDefaultColoredMenu(width, height, colors::BLANK);
m_menu->addMenu(generateMenuOption("New game", Screen::GAME, colors::AMETHYST));
m_menu->addMenu(generateMenuOption("Load game", Screen::LOAD_GAME, colors::AMETHYST));
m_menu->addMenu(generateMenuOption("Quit", Screen::EXIT, colors::AMETHYST));
}
bool HomeScreenUiHandler::processUserInput(UserInputData &inputData)
{
return m_menu->processUserInput(inputData);
}
void HomeScreenUiHandler::render(Renderer &engine) const
{
m_menu->render(engine);
}
void HomeScreenUiHandler::updateUi() {}
} // namespace pge