ScummVM API documentation
bonus_menu.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 TETRAEDGE_GAME_BONUS_MENU_H
23 #define TETRAEDGE_GAME_BONUS_MENU_H
24 
25 #include "common/array.h"
26 #include "common/str.h"
27 #include "tetraedge/te/te_layout.h"
28 #include "tetraedge/te/te_lua_gui.h"
29 #include "tetraedge/te/te_vector2s32.h"
30 
31 namespace Tetraedge {
32 
33 class BonusMenu : public TeLuaGUI {
34 public:
35  BonusMenu();
36 
37  // This is called a "save button", but actually it's used for
38  // bonus artwork in this context. Bad naming is copied from
39  // the original.
40  class SaveButton : public TeLayout {
41  public:
42  SaveButton(TeButtonLayout *btn, const Common::String &name, BonusMenu *owner);
43  // another confusing name - actually just shows the bonus artwork
44  bool onLoadSave();
45  Common::String path() const;
46 
47  BonusMenu *_menu;
48  };
49 
50  virtual void enter() override;
51  virtual void enter(const Common::Path &scriptName);
52  void leave() override;
53 
54  void loadGame(Common::String &name) {
55  _gameName = name;
56  }
57 
58  bool onLeftButton();
59  bool onMouseMove(const Common::Point &pt);
60  bool onPictureButton();
61  bool onQuitButton();
62  bool onRightButton();
63  bool onSlideButtonDown();
64 
65  // empty? bool onLoadGameConfirmed() { };
66 
67 private:
68  Common::Array<SaveButton *> _saveButtons;
69  TeVector2s32 _slideBtnStartMousePos;
70  Common::String _gameName;
71  int _pageNo;
72 };
73 
74 } // end namespace Tetraedge
75 
76 #endif // TETRAEDGE_GAME_BONUS_MENU_H
Definition: str.h:59
Definition: detection.h:27
Definition: bonus_menu.h:40
Definition: array.h:52
Definition: te_lua_gui.h:51
Definition: path.h:52
Definition: te_button_layout.h:38
Definition: te_layout.h:35
Definition: rect.h:45
Definition: te_vector2s32.h:31
Definition: bonus_menu.h:33