mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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( );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user