ScummVM API documentation
gamewindow.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_GAME_WINDOW_H
23 #define STARK_UI_GAME_WINDOW_H
24 
25 #include "engines/stark/gfx/faderenderer.h"
26 #include "engines/stark/gfx/renderentry.h"
27 #include "engines/stark/ui/window.h"
28 
29 #include "common/scummsys.h"
30 #include "common/rect.h"
31 #include "common/array.h"
32 
33 namespace Stark {
34 
35 class ActionMenu;
36 class InventoryWindow;
37 
38 class GameWindow : public Window {
39 public:
40  GameWindow(Gfx::Driver *gfx, Cursor *cursor, ActionMenu *actionMenu, InventoryWindow *inventory);
41  virtual ~GameWindow();
42 
44  void reset();
45 
47  void onScreenChanged();
48 
50  void toggleExitDisplay() { _displayExit = !_displayExit; }
51 
52 protected:
53  void onMouseMove(const Common::Point &pos) override;
54  void onClick(const Common::Point &pos) override;
55  void onRightClick(const Common::Point &pos) override;
56  void onDoubleClick(const Common::Point &pos) override;
57  void onRender() override;
58 
59  void checkObjectAtPos(const Common::Point &pos, int16 selectedInventoryItem, int16 &singlePossibleAction, bool &isDefaultAction);
60 
61  ActionMenu *_actionMenu;
62  InventoryWindow *_inventory;
63 
64  Gfx::RenderEntryArray _renderEntries;
65  Resources::ItemVisual *_objectUnderCursor;
66  Common::Point _objectRelativePosition;
67 
68  Gfx::FadeRenderer *_fadeRenderer;
69 
70  VisualImageXMG *_exitArrow, *_exitArrowLeft, *_exitArrowRight;
71  int _exitLeftBoundary, _exitRightBoundary;
72 
73  bool _displayExit;
74 };
75 
76 } // End of namespace Stark
77 
78 #endif // STARK_UI_GAME_WINDOW_H
Definition: window.h:54
Definition: array.h:52
Definition: gamewindow.h:38
Definition: item.h:139
Definition: driver.h:44
Definition: cursor.h:45
Definition: console.h:27
Definition: faderenderer.h:31
Definition: rect.h:45
Definition: actionmenu.h:40
void toggleExitDisplay()
Definition: gamewindow.h:50
Definition: image.h:45
Definition: inventorywindow.h:40