ScummVM API documentation
question2.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_QUESTION2_H
23 #define TETRAEDGE_GAME_QUESTION2_H
24 
25 #include "tetraedge/te/te_lua_gui.h"
26 #include "tetraedge/te/te_layout.h"
27 
28 
29 namespace Tetraedge {
30 
31 class Question2 : public TeLayout {
32 public:
33  Question2();
34  ~Question2();
35 
36  class Answer {
37  public:
38  TeLayout *layout();
39  void load(const Common::String &name, const Common::String &unk, const Common::Path &path);
40  void unload();
41  bool onButtonValidated();
42 
43  TeLuaGUI _gui;
44  Common::String _str;
45  TeSignal1Param<Question2::Answer &> _onButtonValidatedSignal;
46  };
47 
48  void enter();
49  void leave();
50  void load();
51  bool isEntered() const { return _entered; }
52  bool onAnswerValidated(Answer &answer);
53  void pushAnswer(const Common::String &name, const Common::String &unk, const Common::Path &path);
54  void unload();
55  TeLuaGUI &gui() { return _gui; }
56  TeSignal1Param<const Common::String &> &onAnswerSignal() { return _onAnswerSignal; }
57 
58 private:
59  bool _entered;
60  Common::Array<Answer *> _answers;
61  TeLuaGUI _gui;
63 
64 };
65 
66 } // end namespace Tetraedge
67 
68 #endif // TETRAEDGE_GAME_QUESTION2_H
Definition: str.h:59
Definition: detection.h:27
Definition: array.h:52
Definition: te_lua_gui.h:51
Definition: path.h:52
Definition: question2.h:36
Definition: question2.h:31
Definition: te_layout.h:35
Definition: te_signal.h:80