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

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents 491f0babd563
children 4cc81f981afb
comparison
equal deleted inserted replaced
2523:c532d5242055 2524:c7264ab7132f
108 pRenderer->BeginScene(); 108 pRenderer->BeginScene();
109 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); 109 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
110 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; 110 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20;
111 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); 111 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY);
112 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - window->GetWidth(), 2, pTexture_MAKESKY); 112 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - window->GetWidth(), 2, pTexture_MAKESKY);
113 pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP); 113 pRenderer->DrawTextureIndexedAlpha(0, 0, pTexture_MAKETOP);
114 114
115 uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7; 115 uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7;
116 switch (uPlayerCreationUI_SelectedCharacter) 116 switch (uPlayerCreationUI_SelectedCharacter)
117 { 117 {
118 case 0: pX = 12; break; 118 case 0: pX = 12; break;
123 Error("Invalid selected character"); 123 Error("Invalid selected character");
124 } 124 }
125 125
126 pTextCenter = pFontCChar->AlignText_Center(window->GetWidth(), pGlobalTXT_LocalizationStrings[51]); 126 pTextCenter = pFontCChar->AlignText_Center(window->GetWidth(), pGlobalTXT_LocalizationStrings[51]);
127 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);//Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä 127 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0);//Ñ Î Ç Ä À Ò Ü Î Ò Ð ß Ä
128 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]); 128 pRenderer->DrawTextureIndexedAlpha(17, 35, pPlayerPortraits[pParty->pPlayers[0].uCurrentFace]);
129 pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uCurrentFace]); 129 pRenderer->DrawTextureIndexedAlpha(176, 35, pPlayerPortraits[pParty->pPlayers[1].uCurrentFace]);
130 pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uCurrentFace]); 130 pRenderer->DrawTextureIndexedAlpha(335, 35, pPlayerPortraits[pParty->pPlayers[2].uCurrentFace]);
131 pRenderer->DrawTextureTransparent(494, 35, pPlayerPortraits[pParty->pPlayers[3].uCurrentFace]); 131 pRenderer->DrawTextureIndexedAlpha(494, 35, pPlayerPortraits[pParty->pPlayers[3].uCurrentFace]);
132 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); 132 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime);
133 133
134 134
135 pRenderer->DrawTextureTransparent(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]); 135 pRenderer->DrawTextureIndexedAlpha(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]);
136 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); 136 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem);
137 uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25; 137 uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25;
138 pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]); 138 pRenderer->DrawTextureIndexedAlpha(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]);
139 pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]); 139 pRenderer->DrawTextureIndexedAlpha(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]);
140 140
141 memset(pText, 0, 200); 141 memset(pText, 0, 200);
142 strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" 142 strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills"
143 for ( int i = strlen(pText) - 1; i >= 0; i-- )//??? 143 for ( int i = strlen(pText) - 1; i >= 0; i-- )//???
144 pText[i] = toupper((unsigned __int8)pText[i]); 144 pText[i] = toupper((unsigned __int8)pText[i]);
149 pX_Numbers = 493; 149 pX_Numbers = 493;
150 150
151 for (int i = 0; i < 4; ++i) 151 for (int i = 0; i < 4; ++i)
152 { 152 {
153 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[pParty->pPlayers[i].classType], 0, 0, 0); 153 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pIntervalX + 73, 100, 0, pClassNames[pParty->pPlayers[i].classType], 0, 0, 0);
154 pRenderer->DrawTextureTransparent(pIntervalX + 77, 50, pTexture_IC_KNIGHT[pParty->pPlayers[i].classType / 4]); 154 pRenderer->DrawTextureIndexedAlpha(pIntervalX + 77, 50, pTexture_IC_KNIGHT[pParty->pPlayers[i].classType / 4]);
155 155
156 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_NONE && pGUIWindow_CurrentMenu->ptr_1C == (void *)i ) 156 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_NONE && pGUIWindow_CurrentMenu->ptr_1C == (void *)i )
157 { 157 {
158 switch ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 ) 158 switch ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 )
159 { 159 {