mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -4046,7 +4046,23 @@ void SMInvClickCallback( 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( &gpSMCurrentMerc->inv[ uiHandPos ], uiHandPos, gpSMCurrentMerc );
|
||||
if( ( gpSMCurrentMerc->inv[ uiHandPos ].ubNumberOfObjects > 1 && isLimit > 0 ) && ( guiCurrentScreen != MAP_SCREEN ) )
|
||||
|
||||
// access description box directly if CTRL is pressed for stack items
|
||||
if( !( ( gpSMCurrentMerc->inv[ uiHandPos ].ubNumberOfObjects > 1 && isLimit > 0 ) && ( guiCurrentScreen != MAP_SCREEN ) ) || _KeyDown( CTRL ) )
|
||||
{
|
||||
if ( !InItemDescriptionBox( ) )
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpSMCurrentMerc->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (gpSMCurrentMerc->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !(Item[gpSMCurrentMerc->inv[ uiHandPos ].usItem].singleshotrocketlauncher) && !( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE ) )
|
||||
{
|
||||
EmptyWeaponMagazine( &(gpSMCurrentMerc->inv[ uiHandPos ]), &gItemPointer, uiHandPos );
|
||||
gpItemPointer = &gItemPointer;
|
||||
gpItemPointerSoldier = gpSMCurrentMerc;
|
||||
}
|
||||
else
|
||||
InitItemDescriptionBox( gpSMCurrentMerc, (UINT8)uiHandPos, ITEMDESC_START_X, ITEMDESC_START_Y, 0 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !InItemStackPopup( ) )
|
||||
{
|
||||
@@ -4070,20 +4086,6 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !InItemDescriptionBox( ) )
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[gpSMCurrentMerc->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (gpSMCurrentMerc->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !(Item[gpSMCurrentMerc->inv[ uiHandPos ].usItem].singleshotrocketlauncher) && !( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE ) )
|
||||
{
|
||||
EmptyWeaponMagazine( &(gpSMCurrentMerc->inv[ uiHandPos ]), &gItemPointer, uiHandPos );
|
||||
gpItemPointer = &gItemPointer;
|
||||
gpItemPointerSoldier = gpSMCurrentMerc;
|
||||
}
|
||||
else
|
||||
InitItemDescriptionBox( gpSMCurrentMerc, (UINT8)uiHandPos, ITEMDESC_START_X, ITEMDESC_START_Y, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user