void CUIMng::CreateTitleSceneUI()
{
ReleaseTitleSceneUI();
CInput& rInput = CInput::Instance();
float fScaleX = (float)rInput.GetScreenWidth() / 800.0f;
float fScaleY = (float)rInput.GetScreenHeight() / 600.0f;
LoadBitmapA("Custom\\Interface\\NL_Loading.tga", 531123, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_BarFrame.tga", 531124, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Porcento.tga", 531126, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\newui_number1.tga", 31337, 9729, 10496, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back1.jpg", 531122, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back2.jpg", 531125, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Bar.jpg", 31122, 0x2601, 0x2901, 1, 0);
m_pgbLoding = new CGaugeBar;
RECT rc = { -36, 4, 656 + 36, 10 };
m_pgbLoding->Create(4, 15, 31122, &rc, 0, 0, -1, true, fScaleX, fScaleY);
m_pgbLoding->SetPosition(72, 521);
m_pgbLoding->Show();
m_nScene = UIM_SCENE_TITLE;
}
void CUIMng::ReleaseTitleSceneUI()
{
SAFE_DELETE_ARRAY(m_asprTitle);
SAFE_DELETE(m_pgbLoding);
m_nScene = UIM_SCENE_NONE;
}
void CUIMng::RenderTitleSceneUI(HDC hDC, DWORD dwNow, DWORD dwTotal)
{
::BeginOpengl();
::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
::BeginBitmap();
float FT_Perspective = (float)(1024.f / (float)WindowHeight);
float FT_Width = (float)(2048.f / FT_Perspective);
float FT_Height = (float)(1024.f / FT_Perspective);
float iPos_x = 0 + ((WindowWidth - FT_Width) / 2.f);
float iPos_y = 0 + ((WindowHeight - FT_Height) / 2.f);
float width = (FT_Width / 2.f);
EnableAlphaTest(TRUE);
glAlphaFunc(GL_GREATER, 0.0f);
RenderBitmap(531122, iPos_x, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);
RenderBitmap(531125, iPos_x + width, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);
FT_Perspective = (float)(1024.f / (float)WindowWidth);
FT_Height = (float)(119.f / FT_Perspective);
iPos_x = 0;
iPos_y = WindowHeight - FT_Height;
RenderBitmap(531123, iPos_x, iPos_y, WindowWidth, FT_Height, 0.0, 0.0, 1.f, 119.f / 128.f, 0, 0, 0.0);
m_pgbLoding->SetValue(dwNow, dwTotal);
m_pgbLoding->Render();