ScummVM API documentation
gamescreen.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef STARK_UI_WORLD_GAME_SCREEN_H
23 #define STARK_UI_WORLD_GAME_SCREEN_H
24 
25 #include "engines/stark/ui/screen.h"
26 
27 namespace Stark {
28 
29 class ActionMenu;
30 class Cursor;
31 class DialogPanel;
32 class GameWindow;
33 class InventoryWindow;
34 class TopMenu;
35 class Window;
36 
42 class GameScreen : public Screen {
43 public:
44  GameScreen(Gfx::Driver *gfx, Cursor *cursor);
45  virtual ~GameScreen();
46 
47  // Screen API
48  void open() override;
49  void close() override;
50  void handleGameLoop() override;
51  void render() override;
52  void onScreenChanged() override;
53  void handleMouseMove() override;
54  void handleClick() override;
55  void handleRightClick() override;
56  void handleDoubleClick() override;
57 
60  GameWindow *getGameWindow() const;
61  DialogPanel *getDialogPanel() const;
62 
64  void reset();
65 
67  void notifyInventoryItemEnabled(uint16 itemIndex);
68 
71 
72 
73 private:
74  Gfx::Driver *_gfx;
75  Cursor *_cursor;
76 
77  // Game Screen windows
78  ActionMenu *_actionMenu;
79  DialogPanel *_dialogPanel;
80  InventoryWindow *_inventoryWindow;
81  TopMenu *_topMenu;
82  GameWindow *_gameWindow;
83 
84  // Game screen windows array
85  Common::Array<Window *> _gameScreenWindows;
86 
87  typedef void (Window::*WindowHandler)();
88  void dispatchEvent(WindowHandler handler);
89  void pauseGame(bool pause);
90 };
91 
92 } // End of namespace Stark
93 
94 #endif // STARK_UI_WORLD_GAME_SCREEN_H
Definition: topmenu.h:39
Definition: window.h:54
Definition: array.h:52
void close() override
Definition: gamewindow.h:38
void onScreenChanged() override
void handleGameLoop() override
Definition: driver.h:44
Definition: cursor.h:45
Definition: atari-cursor.h:38
Definition: console.h:27
Definition: actionmenu.h:40
void render() override
Definition: dialogpanel.h:44
void notifyInventoryItemEnabled(uint16 itemIndex)
void open() override
Definition: gamescreen.h:42
Definition: inventorywindow.h:40
Definition: screen.h:35
InventoryWindow * getInventoryWindow() const
void notifyDiaryEntryEnabled()