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 ###################################################
26 from GUIDefines
import *
34 def StartLoadScreen ():
37 GemRB
.LoadWindowPack ("guils", 640, 480)
38 LoadScreen
= GemRB
.LoadWindow (0)
39 LoadScreen
.SetFrame ()
40 Middle
= LoadScreen
.GetControl (3)
41 LoadPic
= GemRB
.GetGameString (STR_LOADMOS
)
43 LoadPic
= "GTRSK00"+str(GemRB
.Roll(1,5,1) )
44 Middle
.SetMOS (LoadPic
)
46 GemRB
.SetVar ("Progress", Progress
)
47 if GUICommon
.HasTOB():
48 Table
= GemRB
.LoadTable ("loadh25")
50 Table
= GemRB
.LoadTable ("loadhint")
51 tmp
= Table
.GetRowCount ()
52 tmp
= GemRB
.Roll (1,tmp
,0)
53 HintStr
= Table
.GetValue (tmp
, 0)
54 TextArea
= LoadScreen
.GetControl (2)
55 TextArea
.SetText (HintStr
)
56 Bar
= LoadScreen
.GetControl (0)
57 Bar
.SetVarAssoc ("Progress", Progress
)
58 Bar
.SetEvent (IE_GUI_PROGRESS_END_REACHED
, EndLoadScreen
)
59 LoadScreen
.SetVisible (WINDOW_VISIBLE
)
62 LoadScreen
.SetVisible (WINDOW_VISIBLE
)