2016-09-16 20:18:03 +00:00
|
|
|
#include "CSlideShow.hpp"
|
2016-09-16 23:43:33 +00:00
|
|
|
#include "GameGlobalObjects.hpp"
|
|
|
|
#include "Editor/ProjectManager.hpp"
|
2016-09-16 20:18:03 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CSlideShow::CSlideShow()
|
2016-09-16 23:43:33 +00:00
|
|
|
: CIOWin("SlideShow"), x5c_slideA(*this), x90_slideB(*this)
|
2016-09-16 20:18:03 +00:00
|
|
|
{
|
2016-09-16 23:43:33 +00:00
|
|
|
x130_ = g_tweakSlideShow->GetX54();
|
|
|
|
x134_24_ = true;
|
|
|
|
x134_30_ = true;
|
|
|
|
x135_24_ = true;
|
|
|
|
|
2016-09-17 21:33:32 +00:00
|
|
|
const SObjectTag* font = g_ResFactory->GetResourceIdByName(g_tweakSlideShow->GetFont().c_str());
|
|
|
|
if (font)
|
|
|
|
{
|
|
|
|
CGuiTextProperties propsA(false, true, EJustification::Center, EVerticalJustification::Bottom);
|
|
|
|
xc4_textA = std::make_unique<CGuiTextSupport>(font->id, propsA,
|
|
|
|
g_tweakSlideShow->GetFontColor(),
|
|
|
|
g_tweakSlideShow->GetOutlineColor(),
|
|
|
|
zeus::CColor::skWhite, 640, 480, g_SimplePool);
|
|
|
|
|
|
|
|
CGuiTextProperties propsB(false, true, EJustification::Right, EVerticalJustification::Bottom);
|
|
|
|
xc8_textB = std::make_unique<CGuiTextSupport>(font->id, propsB,
|
|
|
|
g_tweakSlideShow->GetFontColor(),
|
|
|
|
g_tweakSlideShow->GetOutlineColor(),
|
|
|
|
zeus::CColor::skWhite, 640, 480, g_SimplePool);
|
|
|
|
}
|
2016-09-16 23:43:33 +00:00
|
|
|
|
2016-09-17 21:33:32 +00:00
|
|
|
xf8_.reserve(18);
|
2016-09-16 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CIOWin::EMessageReturn CSlideShow::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
|
|
|
|
{
|
|
|
|
return EMessageReturn::Exit;
|
|
|
|
}
|
|
|
|
|
2016-09-16 23:43:33 +00:00
|
|
|
void CSlideShow::SSlideData::Draw() const
|
|
|
|
{
|
|
|
|
if (!IsLoaded())
|
|
|
|
return;
|
|
|
|
|
|
|
|
zeus::CRectangle rect;
|
|
|
|
const_cast<CTexturedQuadFilterAlpha&>(*m_texQuad).draw(x30_mulColor, 1.f, rect);
|
|
|
|
|
|
|
|
zeus::CVector2f centeredOffset((x28_canvasSize.x - m_texQuad->GetTex()->GetWidth()) * 0.5f,
|
|
|
|
(x28_canvasSize.y - m_texQuad->GetTex()->GetHeight()) * 0.5f);
|
|
|
|
}
|
|
|
|
|
2016-09-16 20:18:03 +00:00
|
|
|
void CSlideShow::Draw() const
|
|
|
|
{
|
2016-09-16 23:43:33 +00:00
|
|
|
if (x14_phase == Phase::Five)
|
|
|
|
{
|
|
|
|
x5c_slideA.Draw();
|
|
|
|
x90_slideB.Draw();
|
|
|
|
}
|
2016-09-16 20:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|