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
+13 -11
View File
@@ -9720,17 +9720,9 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
// Check for # of slots in item
// CHRISL: Use new ItemSlotLimit function if we're using the new inventory system
UINT8 isLimit = ItemSlotLimit(&pSoldier->inv[uiHandPos], uiHandPos, pSoldier);
if ( ( pSoldier->inv[ uiHandPos ].ubNumberOfObjects > 1 ) && ( isLimit > 0 ) )
{
if ( !InItemStackPopup( ) )
{
// CHRISL: Changed final parameter so that we fill the inventory screen
InitItemStackPopup( pSoldier, (UINT8)uiHandPos, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
fTeamPanelDirty=TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
}
}
else
// access description box directly if CTRL is pressed for stack items
if (!( ( pSoldier->inv[ uiHandPos ].ubNumberOfObjects > 1 ) && ( isLimit > 0 ) ) || _KeyDown( CTRL ) )
{
if ( !InItemDescriptionBox( ) )
{
@@ -9751,6 +9743,16 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
}
}
}
else
{
if ( !InItemStackPopup( ) )
{
// CHRISL: Changed final parameter so that we fill the inventory screen
InitItemStackPopup( pSoldier, (UINT8)uiHandPos, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
fTeamPanelDirty=TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
}
}
}
else if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
{