//=============================================================================//
// ___ ___ _ _ _ __ _ ___ ___ __ __
// |_ _|| __| / \ | \_/ | / _| / \ | o \ o \\ V /
// | | | _| | o || \_/ | ( |_n| o || / / \ /
// |_| |___||_n_||_| |_| \__/|_n_||_|\\_|\\ |_| 2007
//
//=============================================================================//
local PANEL = {}
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:Init()
/*
// Using the default progress bar thing for now..
self.Button = vgui.Create( "DButton", self )
self.Button:SetText( "#Cancel" )
function self.Button:DoClick() CancelLoading() end
*/
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:PerformLayout()
/*
self.Button:AlignRight( 50 )
self.Button:AlignBottom( 50 )
*/
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:Paint()
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:StatusChanged( strStatus )
// If it's a file download we do some different stuff..
local Filename
= string.gsub( strStatus,
"Downloading ",
"" )
self.Progress:DownloadingFile( Filename )
self.Downloads:DownloadingFile( Filename )
return end
self.Progress:StatusChanged( strStatus )
self.Downloads:StatusChanged( strStatus )
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:CheckForStatusChanges()
local str = GetLoadStatus()
if ( !str ) then return end
if ( self.OldStatus && self.OldStatus == str ) then return end
self.OldStatus = str
self:StatusChanged( str )
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:OnActivate()
// Clean it up
self:OnDeactivate()
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:OnDeactivate()
self.Progress:Clean()
self.Downloads:Clean()
end
/*---------------------------------------------------------
---------------------------------------------------------*/
function PANEL:Think()
self:CheckForStatusChanges()
end
local pnlLoading = nil
function GetLoadPanel()
if ( !pnlLoading ) then
end
return pnlLoading
end