ScummVM API documentation
topmenu.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_TOPMENU_H
23 #define STARK_UI_TOPMENU_H
24 
25 #include "common/scummsys.h"
26 #include "common/rect.h"
27 
28 #include "engines/stark/ui/window.h"
29 
30 namespace Stark {
31 
32 class VisualImageXMG;
33 class Button;
34 
35 namespace Resources {
36 class Sound;
37 }
38 
39 class TopMenu : public Window {
40 public:
41  TopMenu(Gfx::Driver *gfx, Cursor *cursor);
42  ~TopMenu() override;
43 
44  // Window API
45  void onGameLoop() override;
46  void onRender() override;
47  void onMouseMove(const Common::Point &pos) override;
48  void onClick(const Common::Point &pos) override;
49 
51  void onScreenChanged();
52 
54  void notifyInventoryItemEnabled(uint16 itemIndex);
55 
57  void notifyDiaryEntryEnabled();
58 
59 private:
60  Button *getButtonAtPosition(const Common::Point &point) const;
61  bool isAnimationPlaying() const;
62  void updateAnimations();
63 
64  bool _widgetsVisible;
65 
66  Button *_inventoryButton;
67  Button *_exitButton;
68  Button *_optionsButton;
69  int _newInventoryItemExplosionAnimTimeRemaining;
70  int _newInventoryItemChestClosingAnimTimeRemaining;
71  int _newDiaryEntryAnimTimeRemaining;
72  Resources::Sound *_inventoryNewItemSound;
73 };
74 
75 } // End of namespace Stark
76 
77 #endif // STARK_UI_TOPMENU_H
Definition: topmenu.h:39
Definition: window.h:54
Definition: button.h:42
Definition: sound.h:47
Definition: driver.h:44
Definition: cursor.h:45
Definition: console.h:27
Definition: rect.h:45
Definition: input.h:69