- updated Soldier tooltips

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@625 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-11-09 19:23:22 +00:00
parent 447ba8cbf7
commit 9fac33fe18
2 changed files with 8 additions and 4 deletions
BIN
View File
Binary file not shown.
+8 -4
View File
@@ -27,6 +27,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
extern void GetSoldierScreenRect(SOLDIERTYPE*,SGPRect*); extern void GetSoldierScreenRect(SOLDIERTYPE*,SGPRect*);
GetSoldierScreenRect( pSoldier, &aRect ); GetSoldierScreenRect( pSoldier, &aRect );
INT16 a1,a2; INT16 a1,a2;
BOOLEAN fDrawTooltip = FALSE;
if ( gfKeyState[ALT] && pSoldier && if ( gfKeyState[ALT] && pSoldier &&
IsPointInScreenRectWithRelative( gusMouseXPos, gusMouseYPos, &aRect, &a1, &a2 ) ) IsPointInScreenRectWithRelative( gusMouseXPos, gusMouseYPos, &aRect, &a1, &a2 ) )
@@ -42,6 +43,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
UINT8 ubTooltipDetailLevel = gGameExternalOptions.ubSoldierTooltipDetailLevel; UINT8 ubTooltipDetailLevel = gGameExternalOptions.ubSoldierTooltipDetailLevel;
UINT32 uiMaxTooltipDistance = gGameExternalOptions.ubStraightSightRange; UINT32 uiMaxTooltipDistance = gGameExternalOptions.ubStraightSightRange;
fDrawTooltip = TRUE;
// get the gridno the cursor is at // get the gridno the cursor is at
GetMouseMapPos( &sSoldierGridNo ); GetMouseMapPos( &sSoldierGridNo );
@@ -93,8 +96,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
} }
else else
{ {
// beyond visual range, do not display tooltip if player has not chosen full or debug details // beyond visual range, do not display tooltip if player has not chosen debug details
if ( ubTooltipDetailLevel < DL_Full ) if ( ubTooltipDetailLevel < DL_Debug )
return; return;
} }
} // fMercIsUsingScope is false } // fMercIsUsingScope is false
@@ -107,7 +110,8 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
// Get the current selected merc // Get the current selected merc
SOLDIERTYPE* pMerc = MercPtrs[ gusSelectedSoldier ]; SOLDIERTYPE* pMerc = MercPtrs[ gusSelectedSoldier ];
if (ManLooksForMan(pMerc, pSoldier, 1) == FALSE) if ( pMerc->bOppList[pSoldier->ubID] != SEEN_CURRENTLY )
//if (ManLooksForMan(pMerc, pSoldier, 1) == FALSE)
{ {
// We do not see the enemy. Return and do not display the tooltip. // We do not see the enemy. Return and do not display the tooltip.
return; return;
@@ -301,7 +305,7 @@ void SoldierTooltip( SOLDIERTYPE* pSoldier )
wcscpy( pRegion->FastHelpText, pStrInfo ); wcscpy( pRegion->FastHelpText, pStrInfo );
} }
if ( gfKeyState[ ALT ] ) if ( gfKeyState[ ALT ] && fDrawTooltip )
{ {
DrawMouseTooltip(); DrawMouseTooltip();
SetRenderFlags( RENDER_FLAG_FULL ); SetRenderFlags( RENDER_FLAG_FULL );