comparison GUI/UI/UIMainMenu.cpp @ 2524:c7264ab7132f

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents 491f0babd563
children a902abdfc7f2
comparison
equal deleted inserted replaced
2523:c532d5242055 2524:c7264ab7132f
30 pPaletteManager->SetColorChannelInfo(5, 6, 5); 30 pPaletteManager->SetColorChannelInfo(5, 6, 5);
31 pPaletteManager->RecalculateAll(); 31 pPaletteManager->RecalculateAll();
32 32
33 for (uint i = 0; i < window->GetHeight(); ++i) 33 for (uint i = 0; i < window->GetHeight(); ++i)
34 pSRZBufferLineOffsets[i] = window->GetWidth() * i; 34 pSRZBufferLineOffsets[i] = window->GetWidth() * i;
35
36 pRenderer->ResetTextureClipRect();
37 35
38 uTextureID_FONTPAL = pIcons_LOD->LoadTexture("FONTPAL", TEXTURE_16BIT_PALETTE); 36 uTextureID_FONTPAL = pIcons_LOD->LoadTexture("FONTPAL", TEXTURE_16BIT_PALETTE);
39 37
40 pFontArrus = LoadFont("arrus.fnt", "FONTPAL", nullptr); 38 pFontArrus = LoadFont("arrus.fnt", "FONTPAL", nullptr);
41 pFontArrus->field_3 = 0; 39 pFontArrus->field_3 = 0;
319 } 317 }
320 else 318 else
321 { 319 {
322 pRenderer->BeginScene(); 320 pRenderer->BeginScene();
323 pRenderer->DrawTextureRGB(0, 0, &mm6title_texture); 321 pRenderer->DrawTextureRGB(0, 0, &mm6title_texture);
324 pRenderer->SetTextureClipRect(credit_window.uFrameX, credit_window.uFrameY, credit_window.uFrameX + credit_window.uFrameWidth, 322 pRenderer->SetUIClipRect(credit_window.uFrameX, credit_window.uFrameY, credit_window.uFrameX + credit_window.uFrameWidth,
325 credit_window.uFrameY + credit_window.uFrameHeight); 323 credit_window.uFrameY + credit_window.uFrameHeight);
326 pRenderer->CreditsTextureScroll(credit_window.uFrameX, credit_window.uFrameY, 0, move_Y, &cred_texture); 324 pRenderer->CreditsTextureScroll(credit_window.uFrameX, credit_window.uFrameY, 0, move_Y, &cred_texture);
327 pRenderer->ResetTextureClipRect(); 325 pRenderer->ResetUIClipRect();
328 pRenderer->EndScene(); 326 pRenderer->EndScene();
329 ++move_Y; 327 ++move_Y;
330 if ( move_Y >= cred_texture.uHeight ) 328 if ( move_Y >= cred_texture.uHeight )
331 SetCurrentMenuID(MENU_MAIN); 329 SetCurrentMenuID(MENU_MAIN);
332 pRenderer->Present(); 330 pRenderer->Present();