Ejemplo n.º 1
0
void UILoadingTransition::Draw(const UIGeometricData &geometricData)
{
    
	if (backgroundSprite)
    {
        Sprite::DrawState drawState;
        drawState.SetRenderState(RenderState::RENDERSTATE_2D_BLEND);
        drawState.SetPosition(geometricData.position);
 		backgroundSprite->Draw(&drawState);
    }

	if (animationSprite)
	{
		int frame = (int32)((animationTime/animationDuration) * animationSprite->GetFrameCount());
		if (frame > animationSprite->GetFrameCount() - 1)
			frame = animationSprite->GetFrameCount() - 1;
		
        Sprite::DrawState drawState;
        drawState.SetRenderState(RenderState::RENDERSTATE_2D_BLEND);
        drawState.SetFrame(frame);
        drawState.SetPosition(geometricData.position);
        
		animationSprite->Draw(&drawState);
	}
}
Ejemplo n.º 2
0
void UIScreenTransition::Draw(const UIGeometricData &geometricData)
{
    Sprite::DrawState drawState;
    drawState.SetRenderState(RenderState::RENDERSTATE_2D_BLEND);
    
	drawState.SetScale(0.5f, 1.0f);
	drawState.SetPosition(0, 0);
    
	renderTargetPrevScreen->Draw(&drawState);

    
	drawState.SetScale(0.5f, 1.0f);
	drawState.SetPosition((Core::Instance()->GetVirtualScreenXMax() - Core::Instance()->GetVirtualScreenXMin()) / 2.0f, 0);
    
	renderTargetNextScreen->Draw(&drawState);
}