------ All content © 2009 DigiPen (USA) Corporation, all rights reserved. ------
-- Author: Justin Whitney
-- Updated: 04/14/2009, jmw

dofile( "../../Assets/Scripts/key_name_mappings.lua" )

------------------------------------------------------------------------------
-- VARS

local GLOBAL_gLetterboxProgress    = Global.gLetterboxProgress

local TOPBAR = Global:CreateEntity( "../../Assets/Xml/entities/game_BlackBG.xml" )
local BOTBAR = Global:CreateEntity( "../../Assets/Xml/entities/game_BlackBG.xml" )
TOPBAR:VIS_sPosCoords( 0.0, 1.01 , 1.0, 1.01 )
BOTBAR:VIS_sPosCoords( 0.0, -.01, 1.0, 0.0 )

local MAXINDENT   = 0.13
local PROGRESS    = 0.0

------------------------------------------------------------------------------
-- LOOPY
while( 1 )
do
  coroutine.yield()

  local prog = GLOBAL_gLetterboxProgress()

  if( prog ~= PROGRESS )
  then
    PROGRESS = prog
    TOPBAR:VIS_sPosCoords( 0.0, 1.01 - MAXINDENT * prog, 1.0, 1.01 )
    BOTBAR:VIS_sPosCoords( 0.0, MAXINDENT * prog,        1.0, 0.0 )
  end

end
