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:
+13
-11
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user