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 ###################################################
25 from GUIDefines
import *
29 def StartLoadScreen ():
32 GemRB
.LoadWindowPack ("guils", 640, 480)
33 LoadScreen
= GemRB
.LoadWindowObject (0)
34 LoadScreen
.SetFrame ()
35 Middle
= LoadScreen
.GetControl (3)
36 LoadPic
= GemRB
.GetGameString (STR_LOADMOS
)
38 LoadPic
= "GTRSK00"+str(GemRB
.Roll(1,5,1) )
39 Middle
.SetMOS (LoadPic
)
41 GemRB
.SetVar ("Progress", Progress
)
42 Table
= GemRB
.LoadTableObject ("loadhint")
43 tmp
= Table
.GetRowCount ()
44 tmp
= GemRB
.Roll (1,tmp
,0)
45 HintStr
= Table
.GetValue (tmp
, 0)
46 TextArea
= LoadScreen
.GetControl (2)
47 TextArea
.SetText (HintStr
)
48 Bar
= LoadScreen
.GetControl (0)
49 Bar
.SetVarAssoc ("Progress", Progress
)
50 LoadScreen
.SetVisible (WINDOW_VISIBLE
)