ScummVM API documentation
dialog2.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_DIALOG2_H
23 #define TETRAEDGE_GAME_DIALOG2_H
24 
25 #include "common/serializer.h"
26 
27 #include "tetraedge/te/te_timer.h"
28 #include "tetraedge/te/te_music.h"
29 #include "tetraedge/te/te_lua_gui.h"
30 
31 namespace Tetraedge {
32 
33 class Dialog2 : public TeLayout {
34 public:
35  Dialog2();
36 
37  struct DialogData {
38  Common::String _name;
39  Common::String _stringVal;
40  Common::Path _sound;
41  Common::String _charname;
42  Common::String _animfile;
43  float _animBlend;
44  };
45 
46  bool isDialogPlaying();
47  void launchNextDialog();
48  void load();
49  void loadFromBackup(); // seems to do nothing useful? just iterates the children..
50  bool onAnimationDownFinished();
51  bool onAnimationUpFinished();
52  bool onMinimumTimeTimer();
53  bool onSkipButton();
54  bool onSoundFinished();
55 
56  void pushDialog(const Common::String &name, const Common::String &textVal, const Common::String &sound, int param_4);
57  void pushDialog(const Common::String &name, const Common::String &textVal, const Common::String &sound,
58  const Common::String &charName, const Common::String &animFile, float animBlend);
59  //void saveToBackup(TiXmlNode *node)
60  void startDownAnimation();
61  void unload();
62 
63  TeLuaGUI &gui() { return _gui; }
64  TeSignal1Param<const Common::String &> &onAnimationDownFinishedSignal() { return _onAnimationDownFinishedSignal; }
65 
66 private:
68 
69  TeTimer _minimumTimeTimer;
70 
71  TeLuaGUI _gui;
72  TeMusic _music;
73 
74  DialogData _currentDialogData;
75 
76  TeSignal1Param<const Common::String &> _onAnimationDownFinishedSignal;
77 };
78 
79 } // end namespace Tetraedge
80 
81 #endif // TETRAEDGE_GAME_DIALOG2_H
Definition: dialog2.h:37
Definition: str.h:59
Definition: detection.h:27
Definition: array.h:52
Definition: te_lua_gui.h:51
Definition: path.h:52
Definition: te_timer.h:33
Definition: dialog2.h:33
Definition: te_layout.h:35
Definition: te_signal.h:80
Definition: te_music.h:35