Bugfixes (by Buggler)

- Close old description box to open the new one if nothing in hand while right-clicking on an item in sector stack
- Ctrl + Right-Click to call info description directly for e first item in stack
- Revert partially to have an empty mouse region to close item stack easily when stack is full (r5632)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5657 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-11-01 15:08:04 +00:00
parent 04278c7ad9
commit 3124310a74
4 changed files with 39 additions and 29 deletions
+7 -2
View File
@@ -8994,7 +8994,7 @@ BOOLEAN InitSectorStackPopup( SOLDIERTYPE *pSoldier, WORLDITEM *pInventoryPoolLi
aRect.iLeft = sInvX + sOffSetX;
aRect.iTop = sInvY + sOffSetY;
aRect.iRight = aRect.iLeft + sItemWidth * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)) * usPopupHeight;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
RestrictMouseCursor( &aRect );
@@ -9164,7 +9164,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
aRect.iLeft = sInvX + xResOffset;
aRect.iTop = sInvY + sOffSetY;
aRect.iRight = aRect.iLeft + min(cnt,sItemWidth) * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)) * usPopupHeight;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
//aRect.iTop = sInvY;
//aRect.iLeft = sInvX;
//aRect.iBottom = sInvY + sInvHeight;
@@ -9978,6 +9978,11 @@ void ItemPopupRegionCallback( MOUSE_REGION * pRegion, INT32 iReason )
//Remove
gfItemPopupRegionCallbackEndFix = TRUE;
// Close old description box when nothing in hand while clicking on an item in sector stack
if ( InItemDescriptionBox( ) && gpItemPointer == NULL && InSectorStackPopup( ) && gpItemPopupObject->ubNumberOfObjects > uiItemPos )
{
DeleteItemDescriptionBox( );
}
DeleteItemStackPopup( );