/
Kotopeska
/
RiseUpGame
Обзор
Документация
Войти
/
Kotopeska
/
RiseUpGame
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
controller/MainController.h
59 строк
1 KB
Kotopeska
init
18 май 2025, 19:03
18 май 2025, 19:03
668dfef
Код
Авторство
О чём код?
#ifndef MAIN_CONTROLLER_H #define MAIN_CONTROLLER_H #include <FL/Fl_Double_Window.H> #include <memory> #include "../model/GameModel.h" #include "../view/GameView.h" #include "../view/MenuView.h" #include "../view/AboutView.h" #include "MenuController.h" #include "GamePlayController.h" #include "GameOverController.h" #include "AboutController.h" namespace Controller { class MainController { private: std::unique_ptr<Fl_Double_Window> m_window; Model::GameModel m_model; std::unique_ptr<View::GameView> m_gameView; std::unique_ptr<View::MenuView> m_menuView; std::unique_ptr<View::AboutView> m_aboutView; std::unique_ptr<MenuController> m_menuController; std::unique_ptr<GamePlayController> m_gamePlayController; std::unique_ptr<GameOverController> m_gameOverController; std::unique_ptr<AboutController> m_aboutController; bool m_isFullscreen; int m_normalWidth; int m_normalHeight; static void timerCallback(void *userData); static void windowCallback(Fl_Widget *widget, void *data); static int eventHandler(int event); void updateViewVisibility(); public: static MainController *m_instance; MainController(int width, int height); ~MainController(); void run(); bool handleEvent(int event); }; } // namespace Controller #endif // MAIN_CONTROLLER_H