mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
More highlighting changes (by Shadooow):
- unified the highlight behavior with currently held item in cursor to only ever highlight compatible items for that item (was the case in tactical, not in map screen) - enabled the body silhouette in map screen to be lit up when hovering/holding consumable item just as it happens in tactical mode - few small fixes correcting code I sent previously git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8999 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+25
-15
@@ -9567,9 +9567,7 @@ void MAPInvMoveCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
||||
|
||||
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
|
||||
|
||||
//gbCheckForMouseOverItemPos = -1;
|
||||
|
||||
if ( pSoldier->inv[ uiHandPos ].exists() == false )
|
||||
if (pSoldier->inv[uiHandPos].exists() == false)
|
||||
return;
|
||||
|
||||
if (iReason == MSYS_CALLBACK_REASON_MOVE)
|
||||
@@ -9577,19 +9575,25 @@ void MAPInvMoveCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
||||
}
|
||||
else if (iReason == MSYS_CALLBACK_REASON_GAIN_MOUSE )
|
||||
{
|
||||
gubMAP_HandInvDispText[uiHandPos] = 2;
|
||||
guiMouseOverItemTime = GetJA2Clock();
|
||||
gfCheckForMouseOverItem = TRUE;
|
||||
gbCheckForMouseOverItemPos = (INT8)uiHandPos;
|
||||
fTeamPanelDirty = TRUE;
|
||||
if (gpItemPointer == NULL)
|
||||
{
|
||||
gubMAP_HandInvDispText[uiHandPos] = 2;
|
||||
guiMouseOverItemTime = GetJA2Clock();
|
||||
gfCheckForMouseOverItem = TRUE;
|
||||
gbCheckForMouseOverItemPos = (INT8)uiHandPos;
|
||||
fTeamPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
if (iReason == MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||
{
|
||||
gubMAP_HandInvDispText[uiHandPos] = 1;
|
||||
HandleCompatibleAmmoUI(pSoldier, (INT8)uiHandPos, FALSE);
|
||||
gfCheckForMouseOverItem = FALSE;
|
||||
gbCheckForMouseOverItemPos = NO_SLOT;
|
||||
fTeamPanelDirty = TRUE;
|
||||
if (gpItemPointer == NULL)
|
||||
{
|
||||
gubMAP_HandInvDispText[uiHandPos] = 1;
|
||||
HandleCompatibleAmmoUI(pSoldier, (INT8)uiHandPos, FALSE);
|
||||
gfCheckForMouseOverItem = FALSE;
|
||||
gbCheckForMouseOverItemPos = NO_SLOT;
|
||||
fTeamPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9864,7 +9868,9 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
||||
MSYS_SetCurrentCursor( EXTERN_CURSOR );
|
||||
fMapInventoryItem=TRUE;
|
||||
fTeamPanelDirty=TRUE;
|
||||
|
||||
//shadooow: this resets the current highlight item selection for swapped item
|
||||
HandleCompatibleAmmoUI(pSoldier, NO_SLOT, FALSE);
|
||||
gfCheckForMouseOverItem = TRUE;
|
||||
// remember which gridno the object came from
|
||||
sObjectSourceGridNo = pSoldier->sGridNo;
|
||||
// and who owned it last
|
||||
@@ -15029,7 +15035,11 @@ void ChangeSelectedInfoChar( INT8 bCharNumber, BOOLEAN fResetSelectedList )
|
||||
fShowInventoryFlag = FALSE;
|
||||
}
|
||||
//shadooow: this resets the current highlight item selection to be redrawn again
|
||||
HandleCompatibleAmmoUI(MercPtrs[gCharactersList[bCharNumber].usSolID], NULL, FALSE);
|
||||
HandleCompatibleAmmoUI(MercPtrs[gCharactersList[bCharNumber].usSolID], NO_SLOT, FALSE);
|
||||
if (gpItemPointer != NULL)
|
||||
{
|
||||
gfCheckForMouseOverItem = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user