# HG changeset patch # User Ritor1 # Date 1384182114 -21600 # Node ID ab7d10b6650345071b751fc1280ed827aa841207 # Parent 4c3e8ec07d12ea5e1ec000f9bc25429e5eb6f800 WritePointedObjectStatusString() fix diff -r 4c3e8ec07d12 -r ab7d10b66503 UI/UiGame.cpp --- a/UI/UiGame.cpp Mon Nov 11 19:05:44 2013 +0600 +++ b/UI/UiGame.cpp Mon Nov 11 21:01:54 2013 +0600 @@ -1494,11 +1494,13 @@ } } } - //конец пределов основного экрана------------------------ - } - for ( v1 = uNumVisibleWindows; v1 >= 0; --v1 ) // some other fullscreen ui + }//конец пределов основного экрана------------------------ + if ( pX > 467 && pX <=639 && pY <= 479 )//пределы нижней области { - pWindow = &pWindowList[pVisibleWindowsIdxs[v1] - 1]; + if ( pCurrentScreen == SCREEN_GAME ) + pWindow = &pWindowList[0]; + else + pWindow = &pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]; if ( (signed int)pX >= (signed int)pWindow->uFrameX && (signed int)pX <= (signed int)pWindow->uFrameZ && (signed int)pY >= (signed int)pWindow->uFrameY && (signed int)pY <= (signed int)pWindow->uFrameW ) { @@ -1549,8 +1551,66 @@ } } } + //} } - pMouse->uPointingObjectID = sub_46A99B(); + if ( pX <= 467 && pY > 351 && pY <= 479 )//пределы нижней области + { + //for ( v1 = uNumVisibleWindows; v1 >= 0; --v1 ) // some other fullscreen ui + //{ + pWindow = &pWindowList[0]; + if ( (signed int)pX >= (signed int)pWindow->uFrameX && (signed int)pX <= (signed int)pWindow->uFrameZ + && (signed int)pY >= (signed int)pWindow->uFrameY && (signed int)pY <= (signed int)pWindow->uFrameW ) + { + for ( pButton = pWindow->pControlsHead; ; pButton = pButton->pNext ) + { + if ( !pButton ) + break; + switch ( pButton->uButtonType ) + { + case 1://for dialogue window + if ( (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 ) + { + pMessageType1 = (UIMessageType)pButton->field_1C; + if ( pMessageType1 ) + pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); + GameUI_SetFooterString(pButton->pButtonName); + uLastPointedObjectID = 1; + return; + } + break; + case 2: + if ( pX >= pButton->uX && pX <= pButton->uZ + && pY >= pButton->uY && pY <= pButton->uW ) + { + pMessageType1 = (UIMessageType)pButton->field_1C; + if ( pMessageType1 ) + pMessageQueue_50CBD0->AddMessage(pMessageType1, pButton->msg_param, 0); + GameUI_SetFooterString(pButton->pButtonName); + uLastPointedObjectID = 1; + return; + } + break; + case 3:// click on skill + if ( pX >= pButton->uX && pX <= pButton->uZ + && pY >= pButton->uY && pY <= pButton->uW ) + { + v7 = (LOBYTE(pPlayers[uActiveCharacter]->pActiveSkills[pButton->msg_param]) & 0x3F) + 1; + if ( pPlayers[uActiveCharacter]->uSkillPoints < v7 ) + sprintf(Str1, pGlobalTXT_LocalizationStrings[469], v7 - pPlayers[uActiveCharacter]->uSkillPoints);// "You need %d more Skill Points to advance here" + else + sprintf(Str1, pGlobalTXT_LocalizationStrings[468], v7);// "Clicking here will spend %d Skill Points" + GameUI_SetFooterString(Str1); + uLastPointedObjectID = 1; + return; + } + break; + } + } + } + //} + } + //pMouse->uPointingObjectID = sub_46A99B(); if ( pMouse->uPointingObjectID == 0 ) { if ( uLastPointedObjectID != 0 ) diff -r 4c3e8ec07d12 -r ab7d10b66503 mm7_2.cpp --- a/mm7_2.cpp Mon Nov 11 19:05:44 2013 +0600 +++ b/mm7_2.cpp Mon Nov 11 21:01:54 2013 +0600 @@ -5154,7 +5154,7 @@ } v25 = &pLevelDecorations[v20]; v26 = v25; - v27 = v25->uEventID; + v27 = pLevelDecorations[v20].uEventID; if ( v27 ) { v23 = GetEventHintString(v27);