Mercurial > mm7
comparison 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 |
comparison
equal
deleted
inserted
replaced
831:9c3f28b31b4a | 832:dfd683c4f538 |
---|---|
4 | 4 |
5 #include "MapInfo.h" | 5 #include "MapInfo.h" |
6 #include "Game.h" | 6 #include "Game.h" |
7 #include "GUIWindow.h" | 7 #include "GUIWindow.h" |
8 #include "GUIFont.h" | 8 #include "GUIFont.h" |
9 #include "GUIButton.h" | |
10 #include "GUIProgressBar.h" | 9 #include "GUIProgressBar.h" |
11 #include "Party.h" | 10 #include "Party.h" |
12 #include "AudioPlayer.h" | 11 #include "AudioPlayer.h" |
13 #include "Outdoor.h" | 12 #include "Outdoor.h" |
14 #include "IndoorCamera.h" | 13 #include "IndoorCamera.h" |
1592 v1 = pY; | 1591 v1 = pY; |
1593 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 ) | 1592 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 ) |
1594 { | 1593 { |
1595 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) | 1594 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext ) |
1596 { | 1595 { |
1597 if ( i->uControlID == 121 | 1596 if ( i->msg == UIMSG_SkillUp |
1598 && (signed int)v0 >= (signed int)i->uX | 1597 && (signed int)v0 >= (signed int)i->uX |
1599 && (signed int)v0 <= (signed int)i->uZ | 1598 && (signed int)v0 <= (signed int)i->uZ |
1600 && (signed int)v1 >= (signed int)i->uY | 1599 && (signed int)v1 >= (signed int)i->uY |
1601 && (signed int)v1 <= (signed int)i->uW ) | 1600 && (signed int)v1 <= (signed int)i->uW ) |
1602 { | 1601 { |
1603 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->uControlParam); | 1602 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->msg_param); |
1604 sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3); | 1603 sub_4179BC_draw_tooltip(pSkillNames[i->msg_param], v3); |
1605 v1 = pY; | 1604 v1 = pY; |
1606 v0 = pX; | 1605 v0 = pX; |
1607 } | 1606 } |
1608 } | 1607 } |
1609 } | 1608 } |
1926 // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage))); | 1925 // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage))); |
1927 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u); | 1926 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u); |
1928 dword_507B00_spell_info_to_draw_in_popup = 0; | 1927 dword_507B00_spell_info_to_draw_in_popup = 0; |
1929 } | 1928 } |
1930 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; | 1929 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup; |
1931 //----- (00416D62) -------------------------------------------------------- | 1930 |
1932 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) | 1931 |
1933 { | 1932 |
1933 | |
1934 | |
1935 //----- (00416D62) -------------------------------------------------------- | |
1936 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this) | |
1937 { | |
1934 signed int pPlayerNum; // eax@12 | 1938 signed int pPlayerNum; // eax@12 |
1935 char *v2; // eax@32 | 1939 char *v2; // eax@32 |
1936 void *v3; // ecx@52 | 1940 void *v3; // ecx@52 |
1937 unsigned int v4; // eax@59 | 1941 unsigned int v4; // eax@59 |
1938 int v5; // esi@62 | 1942 int v5; // esi@62 |
1943 unsigned int v10; // eax@76 | 1947 unsigned int v10; // eax@76 |
1944 char v11; // zf@83 | 1948 char v11; // zf@83 |
1945 GUIButton *pButton; // esi@84 | 1949 GUIButton *pButton; // esi@84 |
1946 unsigned int v13; // ecx@85 | 1950 unsigned int v13; // ecx@85 |
1947 char *pStr; // edi@85 | 1951 char *pStr; // edi@85 |
1948 signed int pControlID; // eax@92 | 1952 //signed int pControlID; // eax@92 |
1949 int v16; // eax@95 | 1953 int v16; // eax@95 |
1950 int v17; // eax@96 | 1954 int v17; // eax@96 |
1951 PLAYER_SKILL_TYPE v18; // eax@98 | 1955 PLAYER_SKILL_TYPE v18; // eax@98 |
1952 char *pStr2; // eax@99 | 1956 char *pStr2; // eax@99 |
1953 unsigned int v20; // eax@108 | 1957 unsigned int v20; // eax@108 |
2216 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext) | 2220 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext) |
2217 { | 2221 { |
2218 if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ | 2222 if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ |
2219 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW ) | 2223 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW ) |
2220 { | 2224 { |
2221 pControlID = pButton->uControlID; | 2225 switch ( pButton->msg ) |
2222 switch ( pControlID ) | 2226 { |
2223 { | 2227 case UIMSG_0: //stats info |
2224 case 0: //stats info | 2228 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7]; |
2225 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7]; | 2229 pStr = aAttributeNames[(signed int)pButton->msg_param % 7]; |
2226 pStr = aAttributeNames[(signed int)pButton->uControlParam % 7]; | |
2227 break; | 2230 break; |
2228 case 62: //Plus button info | 2231 case UIMSG_PlayerCreationClickPlus: //Plus button info |
2229 pStr = pGlobalTXT_LocalizationStrings[670];//Добавить | 2232 pStr = pGlobalTXT_LocalizationStrings[670];//Добавить |
2230 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" | 2233 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков" |
2231 break; | 2234 break; |
2232 case 63: //Minus button info | 2235 case UIMSG_PlayerCreationClickMinus: //Minus button info |
2233 pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть | 2236 pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть |
2234 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" | 2237 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков" |
2235 break; | 2238 break; |
2236 case 64: //Available skill button info | 2239 case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info |
2237 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4); | 2240 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4); |
2238 pStr = pSkillNames[v18]; | 2241 pStr = pSkillNames[v18]; |
2239 pWindow.Hint = pSkillDesc[v18]; | 2242 pWindow.Hint = pSkillDesc[v18]; |
2240 break; | 2243 break; |
2241 case 65: //Available Class Info | 2244 case UIMSG_PlayerCreationSelectClass: //Available Class Info |
2242 pWindow.Hint = pClassDescriptions[pButton->uControlParam]; | 2245 pWindow.Hint = pClassDescriptions[pButton->msg_param]; |
2243 pStr = pClassNames[pButton->uControlParam]; | 2246 pStr = pClassNames[pButton->msg_param]; |
2244 break; | 2247 break; |
2245 case 66: //OK Info | 2248 case UIMSG_PlayerCreationClickOK: //OK Info |
2246 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. | 2249 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры. |
2247 pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК | 2250 pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК |
2248 break; | 2251 break; |
2249 case 67: //Clear info | 2252 case UIMSG_PlayerCreationClickReset: //Clear info |
2250 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. | 2253 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда. |
2251 pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить | 2254 pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить |
2252 break; | 2255 break; |
2253 case 118: // Character info | 2256 case UIMSG_PlayerCreation_SelectAttribute: // Character info |
2254 pStr = pParty->pPlayers[pButton->uControlParam].pName; | 2257 pStr = pParty->pPlayers[pButton->msg_param].pName; |
2255 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->uControlParam].classType]; | 2258 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType]; |
2256 break; | 2259 break; |
2257 } | 2260 } |
2258 if ( pControlID > 68 && pControlID <= 75 ) //Sellected skills info | 2261 if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info |
2259 { | 2262 { |
2260 pSkillId = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72); | 2263 pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48); |
2261 pY = 0; | 2264 pY = 0; |
2262 if ( (signed int)pSkillId < 37 ) | 2265 if ( (signed int)pSkillId < 37 ) |
2263 { | 2266 { |
2264 pSkillInfo = CharacterUI_GetSkillDescText(pButton->uControlParam, (PLAYER_SKILL_TYPE)pSkillId); | 2267 pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId); |
2265 strcpy(pTmpBuf2, pSkillInfo); | 2268 strcpy(pTmpBuf2, pSkillInfo); |
2266 pWindow.Hint = pTmpBuf2; | 2269 pWindow.Hint = pTmpBuf2; |
2267 pStr = pSkillNames[pSkillId]; | 2270 pStr = pSkillNames[pSkillId]; |
2268 } | 2271 } |
2269 } | 2272 } |