1 #include <Interface/LayoutMainMenu.hpp> 2 #include <Interface/Colors.hpp> 3 #include <Interface/Ncurses.hpp> 4 #include <Config/Globals.hpp> 5 #include <Misc/Utils.hpp> 6 #include <Flow/GameStateMainMenu.hpp> 7 #include <Interface/Animation/AnimationSnakes.hpp> 21 LayoutMainMenu::~LayoutMainMenu()
25 void LayoutMainMenu::windowsInit()
27 Layout::windowsInit();
42 this->menu->setTitle(
"Main Menu");
44 if (Globals::Screen::show_borders)
46 this->menu->borders(Globals::Screen::fancy_borders ?
47 Window::BORDER_FANCY :
48 Window::BORDER_REGULAR);
50 this->menu->refresh();
57 this->
main->getH() - this->logo->getH() - 1);
60 this->animation->load();
62 void LayoutMainMenu::windowsExit()
64 SAFE_DELETE(this->menu);
65 SAFE_DELETE(this->logo);
66 SAFE_DELETE(this->animationwin);
67 SAFE_DELETE(this->animation);
69 Layout::windowsExit();
73 this->animation->update();
77 this->animation->draw();
80 this->logo->print(Utils::String::split(
" __ _ _______ __ _ _______ ___ _ _______\n" 81 "| | | || || | | || _ || | | || |\n" 82 "| |_| || _____|| |_| || |_| || |_| || ___|\n" 83 "| || |_____ | || || _|| |___ \n" 84 "| _ ||_____ || _ || || |_ | ___|\n" 85 "| | | | _____| || | | || _ || _ || |___ \n" 86 "|_| |__||_______||_| |__||__| |__||___| |_||_______|",
'\n'),
89 Colors::pair(COLOR_GREEN, COLOR_DEFAULT,
true));
91 this->logo->refresh();
96 menu->
draw(this->menu);
98 this->menu->refresh();
100 this->
main->refresh();
A segment of the terminal screen (2D char matrix).
Window * main
Layout's main Window, where all the others are inside.
Rules and behavior of the Fire animation.
void draw(Menu *menu)
Shows the Main Menu screen, along with drawing #menu.
Interface for how the things are shown on the screen.