Mercurial > mm7
diff mm7_1.cpp @ 832:dfd683c4f538
Hotkeys fixed
Moved GUIButton.h to GUIWindow.h
author | Nomad |
---|---|
date | Wed, 27 Mar 2013 19:50:37 +0200 |
parents | c232f160e6f3 |
children | ceef50611567 710cf848ad24 |
line wrap: on
line diff
--- a/mm7_1.cpp Wed Mar 27 15:04:59 2013 +0200 +++ b/mm7_1.cpp Wed Mar 27 19:50:37 2013 +0200 @@ -12,7 +12,6 @@ #include "Game.h" #include "GUIWindow.h" #include "GUIFont.h" -#include "GUIButton.h" #include "GUIProgressBar.h" #include "Party.h" #include "AudioPlayer.h" @@ -92,7 +91,7 @@ } for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext ) { - if ( j->uControlID == 120 ) + if ( j->msg == UIMSG_InventoryLeftClick) { j->uX = dword_50698C; j->uY = dword_506988; @@ -103,20 +102,6 @@ } } } -// 506980: using guessed type int dword_506980; -// 506984: using guessed type int dword_506984; -// 506988: using guessed type int dword_506988; -// 50698C: using guessed type int dword_50698C; -// 507CC0: using guessed type int dword_507CC0; -// 50651C: using guessed type int dword_50651C; -// 506520: using guessed type int dword_506520; -// 506524: using guessed type int dword_506524; -// 506528: using guessed type int dword_506528; -// 506544: using guessed type int dword_506544; -// 506548: using guessed type int dword_506548; -// 723E80: using guessed type int dword_723E80_award_related[]; -// 723E84: using guessed type int dword_723E84[]; -// 5075E0: using guessed type int pVisibleWindowsIdxs[20]; //----- (0041CD4F) -------------------------------------------------------- bool __thiscall sub_41CD4F(unsigned int _this) @@ -131,7 +116,7 @@ char v8; // zf@21 GUIButton *v9; // ecx@24 int v10; // esi@24 - int v11; // edx@26 + //int v11; // edx@26 int v12; // edx@28 int v13; // esi@32 GUIButton *v14; // eax@37 @@ -140,7 +125,7 @@ int v18; // edx@50 GUIButton *v19; // ecx@54 int v20; // esi@54 - int v21; // edx@56 + //int v21; // edx@56 int v22; // ecx@59 int v23; // edx@59 int v24; // ecx@60 @@ -193,16 +178,8 @@ } while ( v13 ); } - v11 = v9->uControlParam; - /*if ( (signed int)v2 < 40 ) - { - pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v9->uControlID; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v11; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; - v2 = pMessageQueue_50CBD0->uNumMessages + 1; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ - pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1); + + pMessageQueue_50CBD0->AddMessage(v9->msg, v9->msg_param, v1); break; } case VK_RIGHT: @@ -233,8 +210,7 @@ } while ( v10 ); } - v11 = v9->uControlParam; - pMessageQueue_50CBD0->AddMessage((UIMessageType)v9->uControlID, v11, v1); + pMessageQueue_50CBD0->AddMessage(v9->msg, v9->msg_param, v1); break; } case VK_DOWN: @@ -258,8 +234,7 @@ } while ( v20 ); } - v21 = v19->uControlParam; - pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1); + pMessageQueue_50CBD0->AddMessage(v19->msg, v19->msg_param, v1); return 1; } case VK_SELECT: @@ -327,15 +302,8 @@ } while ( v25 ); } - v21 = v19->uControlParam; - /*if ( (signed int)v2 < 40 ) - { - pMessageQueue_50CBD0->pMessages[v2].eType = (UIMessageType)v19->uControlID; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v21; - *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = v1; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ - pMessageQueue_50CBD0->AddMessage((UIMessageType)v19->uControlID, v21, v1); + + pMessageQueue_50CBD0->AddMessage(v19->msg, v19->msg_param, v1); return 1; } case VK_NEXT: @@ -729,19 +697,19 @@ 33u, 1, 0, - 0xA8u, + UIMSG_A8, 0, 0, pGlobalTXT_LocalizationStrings[79], // Close (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0), papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 0); - v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0); - pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0); - v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0); - v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0); - v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0); - v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0); + v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); + pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_85, 0, 0, "", 0); + v2->CreateButton(61u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1u, 0x31u, "", 0); + v2->CreateButton(177u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2u, 0x32u, "", 0); + v2->CreateButton(292u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3u, 0x33u, "", 0); + v2->CreateButton(407u, 424u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4u, 0x34u, "", 0); return v2; }