Improved behavior of buttons in Tactical Placement GUI when hot-dropping.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9248 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-01-12 02:11:34 +00:00
parent 586e3dd0d4
commit beb6e35c09
+26 -5
View File
@@ -1444,9 +1444,20 @@ void PlaceMercs()
{
PickUpMercPiece( i );
}
gubSelectedGroupID = 0;
gbSelectedMercID = 0;
SetCursorMerc( 0 );
if (ButtonList[iTPButtons[SPREAD_BUTTON]]->uiFlags & BUTTON_ENABLED)
{
gubSelectedGroupID = 0;
gbSelectedMercID = 0;
SetCursorMerc(0);
}
else//spread button disabled mean hotdrop
{
gubSelectedGroupID = gMercPlacement[0].pSoldier->ubGroupID;
ButtonList[iTPButtons[GROUP_BUTTON]]->uiFlags |= BUTTON_CLICKED_ON | BUTTON_DIRTY;
gubDefaultButton = GROUP_BUTTON;
gbSelectedMercID = 0;
SetCursorMerc(gbSelectedMercID);
}
gfEveryonePlaced = FALSE;
break;
default:
@@ -1485,8 +1496,18 @@ void GroupPlacementsCallback( GUI_BUTTON *btn, INT32 reason )
{
btn->uiFlags &= ~BUTTON_CLICKED_ON;
btn->uiFlags |= BUTTON_DIRTY;
gubDefaultButton = CLEAR_BUTTON;
gubSelectedGroupID = 0;
if (ButtonList[iTPButtons[SPREAD_BUTTON]]->uiFlags & BUTTON_ENABLED)
{
gubDefaultButton = CLEAR_BUTTON;
gubSelectedGroupID = 0;
}
else//spread button disabled mean hotdrop
{
gubDefaultButton = CLEAR_BUTTON;
gubSelectedGroupID = 0;
gbSelectedMercID = -1;
SetCursorMerc(gbSelectedMercID);
}
}
else
{