2 # GemRB - Infinity Engine Emulator
3 # Copyright (C) 2007 The GemRB Project
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # QuitGame.py - display EndGame sequence
22 ###################################################
25 from GUIDefines
import *
28 movies
= [None,"T1DEATH","T1ABSORB","FINALE"]
32 which
= movies
[GemRB
.GetVar ("QuitGame1")]
34 GemRB
.PlayMovie (which
,1)
35 which
= movies
[GemRB
.GetVar ("QuitGame2")]
37 GemRB
.PlayMovie (which
,1)
38 which
= GemRB
.GetVar ("QuitGame3")
43 GemRB
.SetNextScript("Start")
47 GemRB
.SetNextScript("Start")
49 def DeathWindowEnd ():
52 GemRB
.LoadWindowPack (GUICommon
.GetWindowPack())
53 Window
= GemRB
.LoadWindow (25)
56 Label
= Window
.GetControl (0x0fffffff)
57 strref
= GemRB
.GetVar ("QuitGame3")
58 Label
.SetText (strref
)
61 Button
= Window
.GetControl (1)
62 Button
.SetText (17237)
63 Button
.SetEvent (IE_GUI_BUTTON_ON_PRESS
, DonePress
)
64 Button
.SetFlags (IE_GUI_BUTTON_DEFAULT|IE_GUI_BUTTON_CANCEL
, OP_OR
)
67 GemRB
.SetVar ("MessageWindow", -1)
68 GemRB
.SetVar ("PortraitWindow", Window
.ID
)
70 #making the playing field gray
71 GUICommon
.GameWindow
.SetVisible(WINDOW_GRAYED
)