void CPlayerStateSpectate::DrawSpectatorFade() { // If we're in a host migration we don't get ticked since the game is paused, still need to update the // fade though otherwise players end up on a black screen for several seconds if (g_pGame->GetHostMigrationState() != CGame::eHMS_NotMigrating) { m_fFadeOutAmount = max(m_fFadeOutAmount - gEnv->pTimer->GetFrameTime(ITimer::ETIMER_UI), 0.f); } const float fCurrentFadeOut = m_fFadeOutAmount; C2DRenderUtils* pRenderUtils = g_pGame->GetUI()->Get2DRenderUtils(); ScreenLayoutManager* pLayoutManager = g_pGame->GetUI()->GetLayoutManager(); ScreenLayoutStates prevLayoutState = pLayoutManager->GetState(); pLayoutManager->SetState(eSLO_DoNotAdaptToSafeArea|eSLO_ScaleMethod_None); ColorF color(0.f, 0.f, 0.f, fCurrentFadeOut); float width = pLayoutManager->GetVirtualWidth(); float height = pLayoutManager->GetVirtualHeight(); gEnv->pRenderer->SetState(GS_NODEPTHTEST); pRenderUtils->DrawQuad(0, 0, width, height, color); pLayoutManager->SetState(prevLayoutState); }
//--------------------------------------------------- void SafeAreaRenderer::DrawSafeAreas( void ) { #if ENABLE_HUD_EXTRA_DEBUG if( m_interactiveResize && !m_pResizer ) { m_pResizer = new SafeAreaResizer(m_pScreenLayout); } else if(m_pResizer && !m_interactiveResize) { SAFE_DELETE( m_pResizer ); } #endif ScreenLayoutManager* pLayout = m_pScreenLayout; const Vec2 fullscreen_border = pLayout->GetSafeAreaBorderScreenProportion( eHSAID_fullscreen ); const Vec2 title_safe_border = pLayout->GetSafeAreaBorderScreenProportion( eHSAID_title ); const Vec2 sony_trc_safe_border = pLayout->GetSafeAreaBorderScreenProportion( eHSAID_PS3_trc ); const Vec2 action_safe_border = pLayout->GetSafeAreaBorderScreenProportion( eHSAID_action ); // Get state so we can reset later ScreenLayoutStates prev_state = pLayout->GetState(); // Set to null state so we can render full screen. pLayout->SetState(eSLO_DoNotAdaptToSafeArea|eSLO_ScaleMethod_None); DrawSafeArea( string().Format( "fullscreen area : should not see me! %d%%x,%d%%y", (int)(100.0f*fullscreen_border.x), (int)(100.0f*fullscreen_border.y) ).c_str(), fullscreen_border ); DrawSafeArea( string().Format( "NTSC/PAL title safe %d%%x,%d%%y", (int)(100.0f*title_safe_border.x), (int)(100.0f*title_safe_border.y) ).c_str(), title_safe_border ); DrawSafeArea( string().Format( "sony trc safe %d%%x,%d%%y", (int)(100.0f*sony_trc_safe_border.x), (int)(100.0f*sony_trc_safe_border.y) ).c_str(), sony_trc_safe_border ); DrawSafeArea( string().Format( "NTSC/PAL action safe %d%%x,%d%%y", (int)(100.0f*action_safe_border.x), (int)(100.0f*action_safe_border.y) ).c_str(), action_safe_border ); if( pLayout->GetCurSafeAreaId() == eHSAID_custom ) { const Vec2 custom_safe_border = pLayout->GetSafeAreaBorderScreenProportion( eHSAID_custom ); DrawSafeArea( string().Format( "Custom safe %d%%x,%d%%y (%d,%d)pixels", (int)(100.0f*custom_safe_border.x), (int)(100.0f*custom_safe_border.y), (int)(gEnv->pRenderer->GetWidth()*(1.0f-(2.0f*custom_safe_border.x))), (int)(gEnv->pRenderer->GetHeight()*(1.0f-(2.0f*custom_safe_border.y)) ) ).c_str(), custom_safe_border );// , (int)(100.0f*m_customSafeArea)) } // Size debug const float screen_width = (float)pLayout->GetVirtualWidth(); const float screen_height = (float)pLayout->GetVirtualHeight(); const Vec2 cur_safe = pLayout->GetSafeAreaBorderScreenProportion( pLayout->GetCurSafeAreaId() ); const vector2f orig( cur_safe.x * screen_width, cur_safe.y * screen_height ); const vector2f max( screen_width - (cur_safe.x * screen_width), screen_height - (cur_safe.y * screen_height) ); ColorF pos_text(1.0f, 1.0f, 1.0f, 1.0f); m_p2dRenderUtils->SetFont( gEnv->pCryFont->GetFont("default") ); m_p2dRenderUtils->DrawText( orig.x, orig.y, 15.0f, 15.0f, "(0,0)", pos_text); m_p2dRenderUtils->DrawText( max.x, max.y, 15.0f, 15.0f, "(800,600)", pos_text, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM); pLayout->SetState(prev_state); }
//-------------------------------------------------------------------------------------------------- // Name: Draw // Desc: Draws HUD item //-------------------------------------------------------------------------------------------------- void CLetterBoxHudEventListener::Draw() { C2DRenderUtils* pRenderUtils = g_pGame->GetUI()->Get2DRenderUtils(); ScreenLayoutManager* pLayoutManager = g_pGame->GetUI()->GetLayoutManager(); ScreenLayoutStates prevLayoutState = pLayoutManager->GetState(); pLayoutManager->SetState(eSLO_DoNotAdaptToSafeArea|eSLO_ScaleMethod_None); gEnv->pRenderer->SetState(GS_NODEPTHTEST); // Apply overscan borders to bars Vec2 overscanBorders = Vec2(0.0f,0.0f); gEnv->pRenderer->EF_Query(EFQ_OverscanBorders, overscanBorders); const float overscanBorderHeight = overscanBorders.y * VIRTUAL_SCREEN_HEIGHT; float barHeight = (VIRTUAL_SCREEN_HEIGHT * m_params.scale * (1.0f - overscanBorders.y)) + overscanBorderHeight; pRenderUtils->DrawQuad(0, 0, VIRTUAL_SCREEN_WIDTH, barHeight, m_params.color); pRenderUtils->DrawQuad(0, VIRTUAL_SCREEN_HEIGHT - barHeight, VIRTUAL_SCREEN_WIDTH, barHeight, m_params.color); pLayoutManager->SetState(prevLayoutState); }//-------------------------------------------------------------------------------------------------
void C2DRenderUtils::RenderTest_Text( float fTime, const ColorF& color ) { IFFont *deffont = gEnv->pCryFont->GetFont("default"); SetFont(deffont); ColorF colAligned = color; colAligned.a = 1.0f; // wchar wrapped const float maxWidth = 25.0f; ColorF trans = color; trans.a *= 0.5; DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "TLWRAPPED", trans, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawWrappedText( 800.f, 0.f, maxWidth, 20.f, 20.f, "TRWRAPPED", trans, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawWrappedText( 400.f, 0.f, maxWidth, 20.f, 20.f, "TCWRAPPED", trans, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawWrappedText( 800.f, 600.f, maxWidth, 20.f, 20.f, "BRWRAPPED", trans, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 600.f, maxWidth, 20.f, 20.f, "BLWRAPPED", trans, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 400.f, 600.f, maxWidth, 20.f, 20.f, "BCWRAPPED", trans, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 800.f, 300.f, maxWidth, 20.f, 20.f, "MRWRAPPED", trans, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 300.f, maxWidth, 20.f, 20.f, "MLWRAPPED", trans, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 400.f, 300.f, maxWidth, 20.f, 20.f, "MCWRAPPED", trans, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "TLWRAPPEDA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "TRWRAPPEDA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "TCWRAPPEDA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "BRWRAPPEDA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "BLWRAPPEDA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "BCWRAPPEDA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "MRWRAPPEDA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "MLWRAPPEDA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER ); DrawWrappedText( 0.f, 0.f, maxWidth, 20.f, 20.f, "MCWRAPPEDA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER ); // char /* DrawText( 0.f, 0.f, 20.f, 20.f, "TLDT", color, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( 800.f, 0.f, 20.f, 20.f, "TRDT", color, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawText( 400.f, 0.f, 20.f, 20.f, "TopCenterDT", color, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawText( 800.f, 600.f, 20.f, 20.f, "BRDT", color, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 600.f, 20.f, 20.f, "BLDT", color, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 300.f, 20.f, 20.f, "BottomCenterDT", color, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( 800.f, 300.f, 20.f, 20.f, "MRDT", color, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 300.f, 20.f, 20.f, "MLDT", color, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 400.f, 300.f, 20.f, 20.f, "MiddleCenterDT", color, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); */ float posx = 0.0f, posy = 0.f; DrawText( posx, posy, 20.f, 20.f, "TLDTA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy, 20.f, 20.f, "TRDTA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy+20.0f, 20.f, 20.f, "TopCenterDTA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawText( posx, posy, 20.f, 20.f, "BRDTA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( posx, posy, 20.f, 20.f, "BLDTA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( posx, posy-20.0f, 20.f, 20.f, "BottomCenterDTA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( posx, posy, 20.f, 20.f, "MRDTA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER ); DrawText( posx, posy, 20.f, 20.f, "MLDTA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER ); DrawText( posx, posy+20.0f, 20.f, 20.f, "MiddleCenterDTA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER ); posx = 800.0f/3.0f; posy = 600.0f/3.0f; { ColorF dbgColour(1.f, 1.f, 1.f, 0.2f); CUIManager* pHud = g_pGame->GetUI(); ScreenLayoutManager* pLayoutManager = pHud->GetLayoutManager(); ScreenLayoutStates prevStates = pLayoutManager->GetState(); gEnv->pRenderer->SetState(GS_NODEPTHTEST); DrawQuad( posx, 0.f, 1.f, 600.f, dbgColour); // T2B DrawQuad( 0.f, posy, 800.f, 1.f, dbgColour); // L2R pLayoutManager->SetState(prevStates); } // pivot align DrawText( posx, posy, 20.f, 20.f, "TLDTPA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy, 20.f, 20.f, "TRDTAPA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); posy+=20.0f; DrawText( posx, posy, 20.f, 20.f, "MRDTPA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy, 20.f, 20.f, "MLDTPA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); posy+=20.0f; DrawText( posx, posy, 20.f, 20.f, "BRDTPA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy, 20.f, 20.f, "BLDTPA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); posy+=20.0f; DrawText( posx, posy, 20.f, 20.f, "TopCenterDTAPA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy+20.f, 20.f, 20.f, "MiddleCenterDTPA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( posx, posy+40.0f, 20.f, 20.f, "BottomCenterDTPA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); // screen align DrawText( 0.f, 0.f, 20.f, 20.f, "TLDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "TRDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "TopCenterDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "BRDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "BLDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "BottomCenterDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "MRDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER ); DrawText( 0.f, 0.f, 20.f, 20.f, "MLDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER ); DrawText( 0.f, 0.f, 20.f, 20.f, "MiddleCenterDTSA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER ); // wchar DrawText( 0.f, 0.f, 20.f, 20.f, "TLDW", color, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( 800.f, 0.f, 20.f, 20.f, "TRDW", color, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawText( 400.f, 0.f, 20.f, 20.f, "TCDW", color, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawText( 800.f, 600.f, 20.f, 20.f, "BRDW", color, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 600.f, 20.f, 20.f, "BLDW", color, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 400.f, 600.f, 20.f, 20.f, "BCDW", color, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( 800.f, 300.f, 20.f, 20.f, "MRDW", trans, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 300.f, 20.f, 20.f, "MLDW", trans, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 400.f, 300.f, 20.f, 20.f, "MCDW", trans, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "TLDWA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "TRDWA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "TCDWA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_TOP ); DrawText( 0.f, 0.f, 20.f, 20.f, "BRDWA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "BLDWA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "BCDWA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_BOTTOM ); DrawText( 0.f, 0.f, 20.f, 20.f, "MRDWA", colAligned, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_RIGHT, UIDRAWVERTICAL_CENTER ); DrawText( 0.f, 0.f, 20.f, 20.f, "MLDWA", colAligned, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_LEFT, UIDRAWVERTICAL_CENTER ); DrawText( 0.f, 0.f, 20.f, 20.f, "MCDWA", colAligned, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER, UIDRAWHORIZONTAL_CENTER, UIDRAWVERTICAL_CENTER ); for( int i=0; i<gEnv->pRenderer->GetWidth(); i+=10) { for( int j=0; j<gEnv->pRenderer->GetHeight(); j+=10) { ColorF mcColor( (float)i/(float)gEnv->pRenderer->GetWidth(), (float)j/(float)gEnv->pRenderer->GetHeight(),1.0f,0.2f ); DrawText( (float)i, (float)j, 20.f, 20.f, "ixjabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mcColor ); } } }