factored out the EFFv2 saving into EFFImporter
[gemrb.git] / gemrb / GUIScripts / bg1 / LoadScreen.py
blob25ec5d286ca09169dfd23b94fa472ab083746d32
1 # -*-python-*-
2 # GemRB - Infinity Engine Emulator
3 # Copyright (C) 2003-2004 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 # LoadScreen.py - display Loading screen
22 ###################################################
24 import GemRB
25 from GUIDefines import *
27 LoadScreen = None
29 def SetLoadScreen ():
30 return
32 def StartLoadScreen ():
33 global LoadScreen
35 GemRB.LoadWindowPack ("guils")
36 LoadScreen = GemRB.LoadWindow (0)
37 Middle = LoadScreen.GetControl (4)
38 LoadPic = GemRB.GetGameString (STR_LOADMOS)
39 if LoadPic=="":
40 LoadPic = "GTRSK00"+str(GemRB.Roll(1,5,0))
41 Middle.SetMOS (LoadPic)
42 Bar = LoadScreen.GetControl (0)
43 Progress = 0
44 GemRB.SetVar ("Progress", Progress)
45 Bar.SetVarAssoc ("Progress", Progress)
46 Bar.SetEvent (IE_GUI_PROGRESS_END_REACHED, EndLoadScreen)
47 Skull = LoadScreen.GetControl (3)
48 Skull.SetMOS ("GTRBPSK")
49 LoadScreen.SetVisible (WINDOW_VISIBLE)
50 return
52 def EndLoadScreen ():
53 Skull = LoadScreen.GetControl (3)
54 Skull.SetMOS ("GTRBPSK2")
55 LoadScreen.SetVisible (WINDOW_VISIBLE)
56 LoadScreen.Unload()
57 return