Mercurial > mm7
diff UIPartyCreation.cpp @ 977:ac85898f5903
Слияние
author | Ritor1 |
---|---|
date | Thu, 09 May 2013 01:33:54 +0600 |
parents | 15c6b80caa3a c8a0f6d89c70 |
children | 08fd1436ef35 |
line wrap: on
line diff
--- a/UIPartyCreation.cpp Thu May 09 01:33:38 2013 +0600 +++ b/UIPartyCreation.cpp Thu May 09 01:33:54 2013 +0600 @@ -132,7 +132,7 @@ return result; } //----- (00495B39) -------------------------------------------------------- -void __cdecl PlayerCreationUI_Draw() +void PlayerCreationUI_Draw() { int pTextCenter; // eax@3 IconFrame *pFrame; // eax@3 @@ -185,7 +185,18 @@ pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY); pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP); + uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7; + switch (uPlayerCreationUI_SelectedCharacter) + { + case 0: pX = 12; break; + case 1: pX = 171; break; + case 2: pX = 329; break; + case 3: pX = 488; break; + default: + assert(false && "Invalid selected character"); + } + pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uFace]); @@ -193,31 +204,14 @@ pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uFace]); pRenderer->DrawTextureTransparent(494, 35, pPlayerPortraits[pParty->pPlayers[3].uFace]); pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); - switch ( uPlayerCreationUI_SelectedCharacter ) - { - case 0: - pX = 12; - break; - case 1: - pX = 171; - break; - case 2: - pX = 329; - break; - case 3: - pX = 488; - break; - default: - assert(false);//if click "Knight" crash - //pX = v123; - break; - } + pRenderer->DrawTextureTransparent(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]); uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25; pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]); pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]); + memset(pText, 0, 200); strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" uNumLet = strlen(pText) - 1; @@ -605,10 +599,10 @@ } while ( (signed int)uXb < 640 ); - pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, 0x31u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, 0x32u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, 0x33u, "", 0); - pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, 0x34u, "", 0); + pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, '1', "", 0); + pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, '2', "", 0); + pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, '3', "", 0); + pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, '4', "", 0); uXc = 23; uControlParamc = 2; @@ -625,7 +619,8 @@ uXc += 158; } while ( (signed int)uControlParamc < 30 ); - pGUIWindow_CurrentMenu->_41D08F(28, 0, 7, 40); + pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(28, 0, 7, 40); + pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0xC, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(323, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x14, 0, "", 0); @@ -635,6 +630,7 @@ pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x10, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); + uControlParamd = 0; do { @@ -646,6 +642,7 @@ ++uControlParamd; } while ( uControlParamd < 9 ); + pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, 0xD, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE), 0); pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 0x43, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE2), 0); pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickMinus, 0, 0x2D, "", pTexture_buttminu, 0);