comparison GUI/GUIWindow.cpp @ 2524:c7264ab7132f

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents 9b96a51011fb
children 4cc81f981afb
comparison
equal deleted inserted replaced
2523:c532d5242055 2524:c7264ab7132f
799 pWindow.uFrameWidth -= 18; 799 pWindow.uFrameWidth -= 18;
800 pWindow.uFrameZ -= 18; 800 pWindow.uFrameZ -= 18;
801 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu); 801 pWhiteColor = Color16(0xFFu, 0xFFu, 0xFFu);
802 pColor2 = Color16(0x15u, 0x99u, 0xE9u); 802 pColor2 = Color16(0x15u, 0x99u, 0xE9u);
803 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); 803 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
804 pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_right_panel_loop]); 804 pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_right_panel_loop]);
805 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic ) 805 if ( pDialogueNPCCount != uNumDialogueNPCPortraits || !uHouse_ExitPic )
806 { 806 {
807 pDialogWindow.uFrameWidth = 130; 807 pDialogWindow.uFrameWidth = 130;
808 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight); 808 pDialogWindow.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight);
809 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName; 809 pHouseName = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName;
1846 { 1846 {
1847 pRenderer->ClearZBuffer(0, 479); 1847 pRenderer->ClearZBuffer(0, 479);
1848 draw_leather(); 1848 draw_leather();
1849 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true); 1849 CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
1850 CharacterUI_DrawPaperdoll(pPlayers[uActiveCharacter]); 1850 CharacterUI_DrawPaperdoll(pPlayers[uActiveCharacter]);
1851 pRenderer->DrawTextureTransparent(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u)); 1851 pRenderer->DrawTextureIndexedAlpha(pBtn_ExitCancel->uX, pBtn_ExitCancel->uY, pIcons_LOD->GetTexture(uTextureID_x_x_u));
1852 continue; 1852 continue;
1853 } 1853 }
1854 case WINDOW_ModalWindow: 1854 case WINDOW_ModalWindow:
1855 { 1855 {
1856 ModalWindow_ShowHint(); 1856 ModalWindow_ShowHint();
1968 case WINDOW_PressedButton: 1968 case WINDOW_PressedButton:
1969 { 1969 {
1970 if ( pWindow->Hint != (char *)1 ) 1970 if ( pWindow->Hint != (char *)1 )
1971 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1971 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1972 pButton = (GUIButton *)pWindow->ptr_1C; 1972 pButton = (GUIButton *)pWindow->ptr_1C;
1973 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 1973 pRenderer->DrawTextureIndexedAlpha(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
1974 viewparams->bRedrawGameUI = 1; 1974 viewparams->bRedrawGameUI = 1;
1975 if ( pWindow->Hint ) 1975 if ( pWindow->Hint )
1976 { 1976 {
1977 if ( pWindow->Hint != (char *)1 ) 1977 if ( pWindow->Hint != (char *)1 )
1978 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 1978 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
1983 case WINDOW_5D: 1983 case WINDOW_5D:
1984 { 1984 {
1985 if ( pWindow->Hint != (char *)1 ) 1985 if ( pWindow->Hint != (char *)1 )
1986 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 1986 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
1987 pButton = (GUIButton *)pWindow->ptr_1C; 1987 pButton = (GUIButton *)pWindow->ptr_1C;
1988 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]); 1988 pRenderer->DrawTextureIndexedAlpha(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[1]);
1989 viewparams->bRedrawGameUI = 1; 1989 viewparams->bRedrawGameUI = 1;
1990 pWindow->Release(); 1990 pWindow->Release();
1991 continue; 1991 continue;
1992 } 1992 }
1993 case WINDOW_SaveLoadBtn: 1993 case WINDOW_SaveLoadBtn:
2010 case WINDOW_LoadGame_CancelBtn: 2010 case WINDOW_LoadGame_CancelBtn:
2011 { 2011 {
2012 if ( pWindow->Hint != (char *)1 ) 2012 if ( pWindow->Hint != (char *)1 )
2013 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); 2013 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
2014 pButton = (GUIButton *)pWindow->ptr_1C; 2014 pButton = (GUIButton *)pWindow->ptr_1C;
2015 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); 2015 pRenderer->DrawTextureIndexedAlpha(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]);
2016 viewparams->bRedrawGameUI = 1; 2016 viewparams->bRedrawGameUI = 1;
2017 if ( pWindow->Hint && pWindow->Hint != (char *)1 ) 2017 if ( pWindow->Hint && pWindow->Hint != (char *)1 )
2018 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0); 2018 pButton->DrawLabel(pWindow->Hint, pFontCreate, 0, 0);
2019 pWindow->Release(); 2019 pWindow->Release();
2020 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0); 2020 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0);