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>
21LayoutMainMenu::~LayoutMainMenu()
25void LayoutMainMenu::windowsInit()
27 Layout::windowsInit();
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);
62void LayoutMainMenu::windowsExit()
64 SAFE_DELETE(this->menu);
65 SAFE_DELETE(this->logo);
66 SAFE_DELETE(this->animationwin);
69 Layout::windowsExit();
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();
Rules and behavior of the Fire animation.
virtual void draw()=0
Shows Animation on the screen.
virtual void update()=0
Updates Animation's internal state.
virtual void load()=0
Loads all internal things.
void draw(Menu *menu)
Shows the Main Menu screen, along with drawing menu.
Animation * animation
Cure thing at the main menu.
Interface for how the things are shown on the screen.
Window * main
Layout's main Window, where all the others are inside.
A segment of the terminal screen (2D char matrix).
void setTitle(std::string title, WindowTitlePosition position=Window::TOP_LEFT)
Sets a text that will appear at the top of the Window.
void print(std::string str, int x, int y, ColorPair pair=0)
Shows text #str at x y on the window with color #pair.