mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user