Mercurial > mm7
diff UIPopup.cpp @ 832:dfd683c4f538
Hotkeys fixed
Moved GUIButton.h to GUIWindow.h
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 19:50:37 +0200 |
parents | 0f56abdcce94 |
children | ceef50611567 |
line wrap: on
line diff
--- a/UIPopup.cpp Wed Mar 27 15:04:59 2013 +0200 +++ b/UIPopup.cpp Wed Mar 27 19:50:37 2013 +0200 @@ -6,7 +6,6 @@ #include "Game.h" #include "GUIWindow.h" #include "GUIFont.h" -#include "GUIButton.h" #include "GUIProgressBar.h" #include "Party.h" #include "AudioPlayer.h" @@ -1594,14 +1593,14 @@ { for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) { - if ( i->uControlID == 121 + if ( i->msg == UIMSG_SkillUp && (signed int)v0 >= (signed int)i->uX && (signed int)v0 <= (signed int)i->uZ && (signed int)v1 >= (signed int)i->uY && (signed int)v1 <= (signed int)i->uW ) { - v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->uControlParam); - sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3); + v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->msg_param); + sub_4179BC_draw_tooltip(pSkillNames[i->msg_param], v3); v1 = pY; v0 = pX; } @@ -1928,9 +1927,14 @@ dword_507B00_spell_info_to_draw_in_popup = 0; } // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; - //----- (00416D62) -------------------------------------------------------- - void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) - { + + + + + +//----- (00416D62) -------------------------------------------------------- +void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) +{ signed int pPlayerNum; // eax@12 char *v2; // eax@32 void *v3; // ecx@52 @@ -1945,7 +1949,7 @@ GUIButton *pButton; // esi@84 unsigned int v13; // ecx@85 char *pStr; // edi@85 - signed int pControlID; // eax@92 + //signed int pControlID; // eax@92 int v16; // eax@95 int v17; // eax@96 PLAYER_SKILL_TYPE v18; // eax@98 @@ -2218,50 +2222,49 @@ if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW ) { - pControlID = pButton->uControlID; - switch ( pControlID ) - { - case 0: //stats info - pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7]; - pStr = aAttributeNames[(signed int)pButton->uControlParam % 7]; + switch ( pButton->msg ) + { + case UIMSG_0: //stats info + pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7]; + pStr = aAttributeNames[(signed int)pButton->msg_param % 7]; break; - case 62: //Plus button info + case UIMSG_PlayerCreationClickPlus: //Plus button info pStr = pGlobalTXT_LocalizationStrings[670];//Добавить pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" break; - case 63: //Minus button info + case UIMSG_PlayerCreationClickMinus: //Minus button info pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" break; - case 64: //Available skill button info - v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4); + case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info + v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4); pStr = pSkillNames[v18]; pWindow.Hint = pSkillDesc[v18]; break; - case 65: //Available Class Info - pWindow.Hint = pClassDescriptions[pButton->uControlParam]; - pStr = pClassNames[pButton->uControlParam]; + case UIMSG_PlayerCreationSelectClass: //Available Class Info + pWindow.Hint = pClassDescriptions[pButton->msg_param]; + pStr = pClassNames[pButton->msg_param]; break; - case 66: //OK Info + case UIMSG_PlayerCreationClickOK: //OK Info pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК break; - case 67: //Clear info + case UIMSG_PlayerCreationClickReset: //Clear info pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить break; - case 118: // Character info - pStr = pParty->pPlayers[pButton->uControlParam].pName; - pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->uControlParam].classType]; + case UIMSG_PlayerCreation_SelectAttribute: // Character info + pStr = pParty->pPlayers[pButton->msg_param].pName; + pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType]; break; } - if ( pControlID > 68 && pControlID <= 75 ) //Sellected skills info + if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info { - pSkillId = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72); + pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48); pY = 0; if ( (signed int)pSkillId < 37 ) { - pSkillInfo = CharacterUI_GetSkillDescText(pButton->uControlParam, (PLAYER_SKILL_TYPE)pSkillId); + pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId); strcpy(pTmpBuf2, pSkillInfo); pWindow.Hint = pTmpBuf2; pStr = pSkillNames[pSkillId];