| 1 | // (_||_/ |
| 2 | // ( ) Menu class |
| 3 | // ( o 0 ) |
| 4 | //-OOO°--(_)---°OOO--------------------------------------- |
| 5 | // Copyright (C) 2006 By Dominique Roux-Serret |
| 6 | // .OOOo oOOO. [email protected] |
| 7 | //-( )------( )--------------------------------------- |
| 8 | // ( ( ) / Copyright (C) 2023 By Johnny Jazeix |
| 9 | // (_) (_/ [email protected] |
| 10 | |
| 11 | // This program is free software; you can redistribute it and/or modify |
| 12 | // it under the terms of the GNU General Public License as published by |
| 13 | // the Free Software Foundation; either version 2 or version 3 of the License. |
| 14 | |
| 15 | // This program is distributed in the hope that it will be useful, |
| 16 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | // GNU General Public License for more details. |
| 19 | |
| 20 | // You should have received a copy of the GNU General Public License along |
| 21 | // with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 23 | |
| 24 | #ifndef MENU_DOM_ |
| 25 | #define MENU_DOM_ |
| 26 | |
| 27 | #include "preference.h" |
| 28 | |
| 29 | /*** Fonction d'attente ***/ |
| 30 | /**************************/ |
| 31 | void Sleeping(); |
| 32 | |
| 33 | class Game; |
| 34 | class Audio; |
| 35 | class Gamepad; |
| 36 | class Mouse; |
| 37 | |
| 38 | /*** Définition de la class ***/ |
| 39 | /******************************/ |
| 40 | class Menu |
| 41 | { |
| 42 | public: |
| 43 | Menu(Game &game, Audio &audio, Mouse &mouse, Gamepad &gamepad) : |
| 44 | m_game(game), m_audio(audio), m_mouse(mouse), m_gamepad(gamepad) { }; |
| 45 | ~Menu() = default; |
| 46 | |
| 47 | /*** Fonctions ***/ |
| 48 | /*****************/ |
| 49 | eMenu SDLMain(); // Menu principale |
| 50 | eMenu SDLMain_Language(); // Menu du choix de la langue |
| 51 | void InitMain_Options(); // Prépare l'affichage du menu options |
| 52 | eMenu SDLMain_Options(); // Menu du choix des options |
| 53 | eMenu SDLMain_Speed(); // Menu du choix de la difficulté |
| 54 | eMenu SDLMain_Level(); // Choisi le niveau |
| 55 | #ifndef DCHILDREN |
| 56 | eMenu SDLMain_HR(); // Menu de question sur les droits de l'homme |
| 57 | #endif |
| 58 | void Print_InGame(); // Affiche le menu InGame |
| 59 | eMenu SDLMain_InGame(); // Menu dans le jeu |
| 60 | eMenu SDLMain_Score(bool EditScore = false); // Affiche les scores |
| 61 | |
| 62 | void Print_Main(int Centre = 400) const; // Affiche le menu principale |
| 63 | void Affiche_Main_Centre() const; // Centre les flèches sur le bouton |
| 64 | |
| 65 | private: |
| 66 | /*** Variables ***/ |
| 67 | /*****************/ |
| 68 | int PyE { 0 }; // Position du curseur dans le menu |
| 69 | int Niv { 0 }; |
| 70 | int CentreM { 0 }; // Variable pour le menu options |
| 71 | |
| 72 | Game &m_game; |
| 73 | Audio &m_audio; |
| 74 | Mouse &m_mouse; |
| 75 | Gamepad &m_gamepad; |
| 76 | }; |
| 77 | |
| 78 | #endif |