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:
Sevenfm
2021-05-04 09:56:58 +00:00
parent a9a6193a81
commit 239005365f
4 changed files with 106 additions and 59 deletions
+20 -22
View File
@@ -706,16 +706,10 @@ void SetSMPanelCurrentMerc( UINT8 ubNewID )
SetAllAutoFacesInactive( );
// Turn off compat ammo....
if ( gpItemPointer == NULL )
HandleCompatibleAmmoUI(gpSMCurrentMerc, NO_SLOT, FALSE);
if (gpItemPointer != NULL)
{
HandleCompatibleAmmoUI( gpSMCurrentMerc, (INT8)HANDPOS, FALSE );
gfCheckForMouseOverItem = FALSE;
}
else
{
// Turn it all false first....
InternalHandleCompatibleAmmoUI( gpSMCurrentMerc, gpItemPointer, FALSE );
InternalHandleCompatibleAmmoUI( gpSMCurrentMerc, gpItemPointer, TRUE );
gfCheckForMouseOverItem = TRUE;
}
// Remove item desc panel if one up....
@@ -3224,14 +3218,12 @@ void UpdateStatColor( UINT32 uiTimer, BOOLEAN fIncrease, BOOLEAN fDamaged, BOOLE
void SMInvMoveCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
UINT32 uiHandPos;
uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
return;
}
UINT32 uiHandPos = MSYS_GetRegionUserData( pRegion, 0 );
if ( gpSMCurrentMerc->inv[ uiHandPos ].exists() == false )
return;
@@ -3256,7 +3248,8 @@ void SMInvMoveCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
HandleCompatibleAmmoUI( gpSMCurrentMerc, (INT8)uiHandPos, FALSE );
gfCheckForMouseOverItem = FALSE;
fInterfacePanelDirty = DIRTYLEVEL2;
fInterfacePanelDirty = DIRTYLEVEL2;
gbCheckForMouseOverItemPos = NO_SLOT;
}
}
}
@@ -3279,23 +3272,28 @@ void InvPanelButtonClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
void SMInvMoveCammoCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
return;
}
else if (iReason == MSYS_CALLBACK_REASON_GAIN_MOUSE )
{
// Setup a timer....
guiMouseOverItemTime = GetJA2Clock( );
gfCheckForMouseOverItem = TRUE;
gbCheckForMouseOverItemPos = NO_SLOT;
if (gpItemPointer == NULL)
{
// Setup a timer....
guiMouseOverItemTime = GetJA2Clock();
gfCheckForMouseOverItem = TRUE;
gbCheckForMouseOverItemPos = NO_SLOT;
}
}
if (iReason == MSYS_CALLBACK_REASON_LOST_MOUSE )
{
//gfSM_HandInvDispText[ uiHandPos ] = 1;
HandleCompatibleAmmoUI( gpSMCurrentMerc, (INT8)NO_SLOT, FALSE );
gfCheckForMouseOverItem = FALSE;
if (gpItemPointer == NULL)
{
//gfSM_HandInvDispText[ uiHandPos ] = 1;
HandleCompatibleAmmoUI(gpSMCurrentMerc, (INT8)NO_SLOT, FALSE);
gfCheckForMouseOverItem = FALSE;
}
}
}