40{
42 {
43 TASSERT( m_aTextureSections[ i ] ==
TNULL,
"ALoadScreen is already created" );
45 TASSERT( m_aTextureSections[ i ] !=
TNULL,
"Unable to find texture section" );
46 }
47
49
52 pRootElement->GetDimensions( fWidth, fHeight );
53
54 m_CanvasElement.SetDimensions( fWidth, fHeight );
55 m_CanvasElement.SetColour(
TCOLOR( 0, 0, 0 ) );
56 m_CanvasElement.Hide();
57
58 pRootElement->AddChildTail( m_CanvasElement );
59
60 TFLOAT fRectPosX = fWidth * 0.1f;
61
63 {
65 auto pRectangle = &m_aRectangles[ i ];
66
67 pRectangle->SetDimensions( pTexSection->GetWidth(), pTexSection->GetHeight() );
68 pRectangle->SetTextureSection( pTexSection );
70 pRectangle->SetTransform( fRectPosX, -fHeight * 0.075f );
71 pRectangle->Hide();
72
73 pRootElement->AddChildTail( *pRectangle );
75 }
76
79
80 m_TextBox.Create( pFont, pFont->GetTextWidth( pLoadingString, 1.0f ) );
81 m_TextBox.SetScale( 1.0f );
82 m_TextBox.SetText( pLoadingString );
84 m_TextBox.SetTransform( 0.0f, -fHeight * 0.08f );
85 m_TextBox.Hide();
86
87 pRootElement->AddChildTail( m_TextBox );
88 m_oTimer.Reset();
89
90 m_fTimer = 0.8f;
91 m_fTotalTime = 0.0f;
92}
#define T2_FOREACH_ARRAY(arrName, iteratorName)
@ AGUI2ATTACHMENT_BOTTOMLEFT
@ AGUI2ATTACHMENT_BOTTOMCENTER
static constexpr const TCHAR * ms_LoadTextures[]
static constexpr TUINT32 NUM_LOAD_TEXTURES
static constexpr TUINT32 NUM_LOAD_INDICATORS
static AGUI2Element * GetRootElement()
static AGUI2Font * FindFont(const TCHAR *a_szFontName)
static AGUI2TextureSection * GetTextureSection(const TCHAR *a_szSectionName)
static ALocaleManager * Interface()