ScummVM API documentation
setupmenu.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 NANCY_STATE_SETUPMENU_H
23 #define NANCY_STATE_SETUPMENU_H
24 
25 #include "common/singleton.h"
26 
27 #include "engines/nancy/state/state.h"
28 
29 #include "engines/nancy/ui/fullscreenimage.h"
30 
31 namespace Nancy {
32 
33 struct SET;
34 
35 namespace UI {
36 class Button;
37 class Toggle;
38 class Scrollbar;
39 }
40 
41 namespace State {
42 
43 class SetupMenu : public State, public Common::Singleton<SetupMenu> {
44 public:
45  SetupMenu() : _state(kInit), _exitButton(nullptr), _setupData(nullptr) {}
46  virtual ~SetupMenu();
47 
48  // State API
49  void process() override;
50  void onStateEnter(const NancyState::NancyState prevState) override;
51  bool onStateExit(const NancyState::NancyState nextState) override;
52 
53 private:
54  void init();
55  void run();
56  void stop();
57 
58  void registerGraphics();
59 
60  const Common::String getToggleConfManKey(uint id);
61 
62  enum State { kInit, kRun, kStop };
63 
64  UI::FullScreenImage _background;
65  State _state;
66 
69  UI::Button *_exitButton;
70 
71  const SET *_setupData;
72 };
73 
74 } // End of namespace State
75 } // End of namespace Nancy
76 
77 #endif // NANCY_STATE_SETUPMENU_H
Definition: str.h:59
Definition: array.h:52
Definition: soundequalizerpuzzle.h:27
Definition: enginedata.h:243
Definition: button.h:33
Definition: setupmenu.h:43
Definition: fullscreenimage.h:30
Definition: input.h:69
Definition: actionmanager.h:32
Definition: singleton.h:42