mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
progress loading bar thing
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2248 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
575df34f7e
commit
f93e5f1657
1 changed files with 33 additions and 2 deletions
|
@ -1360,10 +1360,41 @@ void SCR_DrawLoading (void)
|
|||
|
||||
if (COM_FDepthFile("gfx/loading.lmp", true) < COM_FDepthFile("gfx/menu/loading.lmp", true))
|
||||
{
|
||||
int sizex, x, y;
|
||||
|
||||
pic = Draw_SafeCachePic ("gfx/loading.lmp");
|
||||
if (pic)
|
||||
Draw_Pic ( (vid.width - pic->width)/2,
|
||||
(vid.height - 48 - pic->height)/2, pic);
|
||||
{
|
||||
x = (vid.width - pic->width)/2;
|
||||
y = (vid.height - 48 - pic->height)/2;
|
||||
Draw_Pic (x, y, pic);
|
||||
x = (vid.width/2) - 80;
|
||||
y += pic->height + 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = (vid.width/2) - 80;
|
||||
y = (vid.height/2) - 8;
|
||||
}
|
||||
|
||||
if (loading_stage)
|
||||
{
|
||||
sizex = current_loading_size * 160 / total_loading_size;
|
||||
if (loading_stage == 1)
|
||||
{
|
||||
Draw_FillRGB(x, y, sizex, 16, 1.0, 0.0, 0.0);
|
||||
Draw_FillRGB(x+sizex, y, 160-sizex, 16, 0.0, 0.0, 0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Draw_FillRGB(x, y, sizex, 16, 1.0, 1.0, 0.0);
|
||||
Draw_FillRGB(x+sizex, y, 160-sizex, 16, 1.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
Draw_String(x+8, y+4, va("Loading %s... %i%%",
|
||||
(loading_stage == 1) ? "server" : "client",
|
||||
current_loading_size * 100 / total_loading_size));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue