xoreos  0.0.5
moviesbase.cpp
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
27 
29 
30 namespace Engines {
31 
32 namespace NWN {
33 
35  load("pre_movies");
36 }
37 
39 }
40 
42  if (widget.getTag() == "CloseButton") {
43  _returnCode = 1;
44  return;
45  }
46 
47  if (widget.getTag() == "PreludeButton")
48  playVideo("prelude");
49  else if (widget.getTag() == "IntroButton")
50  playVideo("prelude");
51  else if (widget.getTag() == "Chpt1Button")
52  playVideo("prelude_chap1");
53  else if (widget.getTag() == "Chpt2Button")
54  playVideo("chap1_chap2");
55  else if (widget.getTag() == "Chpt3Button")
56  playVideo("chap2_chap3");
57  else if (widget.getTag() == "Chpt4Button")
58  playVideo("chap3_chap4");
59  else if (widget.getTag() == "EndButton")
60  playVideo("ending");
61  else if (widget.getTag() == "CreditsButton")
62  playVideo("credits");
63 
64  updateMouse();
65 }
66 
67 } // End of namespace NWN
68 
69 } // End of namespace Engines
void playVideo(const Common::UString &video)
Play this video resource.
Definition: util.cpp:54
The base game movies menu.
uint32 _returnCode
The GUI&#39;s return code.
Definition: gui.h:75
A NWN GUI.
Definition: gui.h:54
const Common::UString & getTag() const
Get the widget&#39;s tag.
Definition: widget.cpp:45
void callbackActive(Widget &widget)
Callback that&#39;s triggered when a widget was activated.
Definition: moviesbase.cpp:41
void load(const Common::UString &resref)
Definition: gui.cpp:77
A widget in a GUI.
A widget in a GUI.
Definition: widget.h:40
void updateMouse()
Force an update of the mouse position.
Definition: gui.cpp:426
Generic Aurora engines utility functions.
MoviesBaseMenu(::Engines::Console *console=0)
Definition: moviesbase.cpp:34