mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Added "select all" option for strategic movement popup box (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9269 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -120,6 +120,7 @@ enum{
|
||||
DONE_REGION,
|
||||
CANCEL_REGION,
|
||||
OTHER_REGION,
|
||||
ALL_SQUADS
|
||||
};
|
||||
|
||||
UINT16 usVehicleY = 0;
|
||||
@@ -3858,6 +3859,10 @@ void AddStringsToMoveBox( void )
|
||||
// blank line
|
||||
AddMonoString(&hStringHandle, L"" );
|
||||
|
||||
// add Select all line
|
||||
swprintf(sString, L"%s", pMovementMenuStrings[4]);
|
||||
AddMonoString(&hStringHandle, sString);
|
||||
|
||||
|
||||
// add squads
|
||||
for( iCount = 0; iCount < giNumberOfSquadsInSectorMoving; iCount++ )
|
||||
@@ -4040,6 +4045,15 @@ void BuildMouseRegionsForMoveBox( void )
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||
iCounter++;
|
||||
|
||||
// Select all line
|
||||
MSYS_DefineRegion(&gMoveMenuRegion[iCounter], (INT16)(iBoxXPosition), (INT16)(iBoxYPosition + iFontHeight * iCounter), (INT16)(iBoxXPosition + iBoxWidth), (INT16)(iBoxYPosition + iFontHeight * (iCounter + 1)), MSYS_PRIORITY_HIGHEST,
|
||||
MSYS_NO_CURSOR, MoveMenuMvtCallback, MoveMenuBtnCallback);
|
||||
// set user defines
|
||||
MSYS_SetRegionUserData(&gMoveMenuRegion[iCounter], 0, iCounter);
|
||||
MSYS_SetRegionUserData(&gMoveMenuRegion[iCounter], 1, ALL_SQUADS);
|
||||
MSYS_SetRegionUserData(&gMoveMenuRegion[iCounter], 2, giNumberOfSquadsInSectorMoving);
|
||||
iCounter++;
|
||||
|
||||
// calc total number of "moving" lines in the box
|
||||
iTotalNumberOfLines = giNumberOfSoldiersInSectorMoving + giNumberOfSquadsInSectorMoving + giNumberOfVehiclesInSectorMoving;
|
||||
// add the blank lines
|
||||
@@ -4243,7 +4257,24 @@ void MoveMenuBtnCallback(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
giDblClickTimersForMoveBoxMouseRegions[ iMoveBoxLine ] = iClickTime;
|
||||
|
||||
if( iRegionType == SQUAD_REGION )
|
||||
if (iRegionType == ALL_SQUADS)
|
||||
{
|
||||
if (IsAnythingSelectedForMoving())
|
||||
{
|
||||
for (int i = 0; i < iListIndex; i++)
|
||||
{
|
||||
DeselectSquadForMovement(iSquadMovingList[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < iListIndex; i++)
|
||||
{
|
||||
SelectSquadForMovement(iSquadMovingList[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( iRegionType == SQUAD_REGION )
|
||||
{
|
||||
// is the squad moving
|
||||
if( fSquadIsMoving[ iListIndex ] == TRUE )
|
||||
|
||||
@@ -4375,6 +4375,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"安排行军路线", // done with movement menu, start plotting movement
|
||||
L"取消", // cancel this menu
|
||||
L"其它", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4363,6 +4363,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Teken Reisroute", // done with movement menu, start plotting movement
|
||||
L"Stop", // cancel this menu
|
||||
L"Anders", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4375,6 +4375,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Plot Travel Route", // done with movement menu, start plotting movement
|
||||
L"Cancel", // cancel this menu
|
||||
L"Other", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4367,6 +4367,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Route", // done with movement menu, start plotting movement
|
||||
L"Annuler", // cancel this menu
|
||||
L"Autre", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4381,6 +4381,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Route planen", // done with movement menu, start plotting movement
|
||||
L"Abbruch", // cancel this menu
|
||||
L"Andere", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
STR16 pUpdateMercStrings[] =
|
||||
|
||||
@@ -4357,6 +4357,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Rotta spostamento esercito", // done with movement menu, start plotting movement
|
||||
L"Annulla", // cancel this menu
|
||||
L"Altro", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4368,6 +4368,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Nanieś trasę podróży", // done with movement menu, start plotting movement
|
||||
L"Anuluj", // cancel this menu
|
||||
L"Inni", // title for group of mercs not on squads nor in vehicles
|
||||
L"Select all", // Select all squads TODO: Translate
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4375,6 +4375,7 @@ STR16 pMovementMenuStrings[] =
|
||||
L"Путь", // done with movement menu, start plotting movement
|
||||
L"Отмена", // cancel this menu
|
||||
L"Другое", // title for group of mercs not on squads nor in vehicles
|
||||
L"Выбрать все", // Select all squads
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user