1 /*
2  *  This file is part of Dune Legacy.
3  *
4  *  Dune Legacy is free software: you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation, either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  Dune Legacy is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with Dune Legacy.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INGAMEMENU_H
19 #define INGAMEMENU_H
20 
21 #include <GUI/Window.h>
22 #include <GUI/HBox.h>
23 #include <GUI/VBox.h>
24 #include <GUI/TextButton.h>
25 #include <GUI/Spacer.h>
26 
27 class InGameMenu : public Window
28 {
29 public:
30     InGameMenu(bool bMultiplayer, int color);
31     virtual ~InGameMenu();
32 
33     /**
34         Handles a key stroke.
35         \param  key the key that was pressed or released.
36         \return true = key stroke was processed by the window, false = key stroke was not processed by the window
37     */
38     virtual bool handleKeyPress(SDL_KeyboardEvent& key);
39 
40     /**
41         This method is called, when the child window is about to be closed.
42         This child window will be closed after this method returns.
43         \param  pChildWindow    The child window that will be closed
44     */
45     virtual void onChildWindowClose(Window* pChildWindow);
46 
47     void onResume();
48     void onSettings();
49     void onLoad();
50     void onSave();
51     void onRestart();
52     void onQuit();
53 
54 private:
55     bool bMultiplayer;
56     int color;
57 
58     HBox    mainHBox;
59     VBox    mainVBox;
60 
61     TextButton  resumeButton;
62     TextButton  gameSettingsButton;
63     TextButton  restartGameButton;
64     TextButton  saveGameButton;
65     TextButton  loadGameButton;
66     TextButton  quitButton;
67 };
68 
69 
70 #endif // INGAMEMENU_H
71