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:
@@ -1279,16 +1279,21 @@ void MapInvenPoolSlotsMove( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
if( iReason & MSYS_CALLBACK_REASON_GAIN_MOUSE )
|
||||
{
|
||||
iCurrentlyHighLightedItem = iCounter;
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
if (gpItemPointer == NULL)
|
||||
{
|
||||
iCurrentlyHighLightedItem = iCounter;
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
}
|
||||
}
|
||||
else if( iReason & MSYS_CALLBACK_REASON_LOST_MOUSE )
|
||||
{
|
||||
iCurrentlyHighLightedItem = -1;
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = FALSE;
|
||||
|
||||
if (gpItemPointer == NULL)
|
||||
{
|
||||
iCurrentlyHighLightedItem = NO_SLOT;
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = FALSE;
|
||||
}
|
||||
// re render radar map
|
||||
RenderRadarScreen( );
|
||||
}
|
||||
@@ -2749,6 +2754,12 @@ void MapInventoryPoolNextBtn( GUI_BUTTON *btn, INT32 reason )
|
||||
if( iCurrentInventoryPoolPage < ( iLastInventoryPoolPage ) )
|
||||
{
|
||||
iCurrentInventoryPoolPage++;
|
||||
//shadooow: this will re-render item compatibility highlighting when changing pages for currently held item
|
||||
if (gpItemPointer != NULL)
|
||||
{
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
}
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -2771,6 +2782,12 @@ void MapInventoryPoolPrevBtn( GUI_BUTTON *btn, INT32 reason )
|
||||
if( iCurrentInventoryPoolPage > 0 )
|
||||
{
|
||||
iCurrentInventoryPoolPage--;
|
||||
//shadooow: this will re-render item compatibility highlighting when changing pages for currently held item
|
||||
if (gpItemPointer != NULL)
|
||||
{
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
}
|
||||
fMapPanelDirty = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -2924,7 +2941,12 @@ void MapInventoryPoolFilterBtn( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
MapInventoryFilterToggle( btn->UserData[1] );
|
||||
}
|
||||
|
||||
//shadooow: this will re-render item compatibility highlighting when changing filters for currently held item
|
||||
if (gpItemPointer != NULL)
|
||||
{
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
}
|
||||
// HEADROCK HAM 5: Disabled for now, as we've got buttons for this.
|
||||
//CreateMapInventoryFilterMenu( );
|
||||
}
|
||||
@@ -2941,7 +2963,12 @@ void MapInventoryPoolFilterBtn( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
MapInventoryFilterToggle( btn->UserData[3] );
|
||||
}
|
||||
|
||||
//shadooow: this will re-render item compatibility highlighting when changing filters for currently held item
|
||||
if (gpItemPointer != NULL)
|
||||
{
|
||||
fChangedInventorySlots = TRUE;
|
||||
gfCheckForCursorOverMapSectorInventoryItem = TRUE;
|
||||
}
|
||||
// HEADROCK HAM 5: Disabled for now, as we've got buttons for this.
|
||||
//CreateMapInventoryFilterMenu( );
|
||||
}
|
||||
@@ -3630,9 +3657,9 @@ void HandleMouseInCompatableItemForMapSectorInventory( INT32 iCurrentSlot )
|
||||
}
|
||||
|
||||
//Nothing selected or out of bounds or empty slot selected; highlightings reseted already, return
|
||||
if ( iCurrentSlot == NO_SLOT ||
|
||||
if ( gpItemPointer == NULL && (iCurrentSlot == NO_SLOT ||
|
||||
(pInventoryPoolList.size() < (UINT32)(iCurrentSlot + ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) )) ||
|
||||
pInventoryPoolList[ iCurrentSlot + iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ].fExists == FALSE )
|
||||
pInventoryPoolList[ iCurrentSlot + iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ].fExists == FALSE ))
|
||||
{
|
||||
fChangedInventorySlots = FALSE;
|
||||
if (fItemWasHighLighted)
|
||||
|
||||
Reference in New Issue
Block a user