- Disabled Tab hotkey for description tab switching in strategic screen so as not to interfere with militia equipment assignment (use Ctrl+Tab like in tactical screen) (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5873 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-02-26 14:00:48 +00:00
parent 2cfe4bd7fc
commit b107a916e1
2 changed files with 23 additions and 42 deletions
+10 -32
View File
@@ -5734,42 +5734,20 @@ void RenderIconsPerSectorForSelectedTown( void )
// now display // now display
for( iCurrentTroopIcon = 0; iCurrentTroopIcon < iTotalNumberOfTroops; iCurrentTroopIcon++ ) for( iCurrentTroopIcon = 0; iCurrentTroopIcon < iTotalNumberOfTroops; iCurrentTroopIcon++ )
{ {
// get screen x and y coords sX = ( iCurrentTroopIcon % POPUP_MILITIA_ICONS_PER_ROW ) * MEDIUM_MILITIA_ICON_SPACING + MAP_MILITIA_BOX_POS_X + MAP_MILITIA_MAP_X + ( ( iCounter % MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_WIDTH ) + 3;
if( sSectorMilitiaMapSector == iCounter ) sY = ( iCurrentTroopIcon / POPUP_MILITIA_ICONS_PER_ROW ) * ( MEDIUM_MILITIA_ICON_SPACING ) + MAP_MILITIA_BOX_POS_Y + MAP_MILITIA_MAP_Y + ( ( iCounter / MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_HEIGHT ) + 3;
{
sX = ( iCurrentTroopIcon % POPUP_MILITIA_ICONS_PER_ROW ) * MEDIUM_MILITIA_ICON_SPACING + MAP_MILITIA_BOX_POS_X + MAP_MILITIA_MAP_X + ( ( iCounter % MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_WIDTH ) + 2;
sY = ( iCurrentTroopIcon / POPUP_MILITIA_ICONS_PER_ROW ) * ( MEDIUM_MILITIA_ICON_SPACING - 1 ) + MAP_MILITIA_BOX_POS_Y + MAP_MILITIA_MAP_Y + ( ( iCounter / MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_HEIGHT ) + 3;
if( iCurrentTroopIcon < iNumberOfGreens ) if( iCurrentTroopIcon < iNumberOfGreens )
{ {
iCurrentIcon = 5; iCurrentIcon = 8;
} }
else if( iCurrentTroopIcon < iNumberOfGreens + iNumberOfRegulars ) else if( iCurrentTroopIcon < iNumberOfGreens + iNumberOfRegulars )
{ {
iCurrentIcon = 6; iCurrentIcon = 9;
}
else
{
iCurrentIcon = 7;
}
} }
else else
{ {
sX = ( iCurrentTroopIcon % POPUP_MILITIA_ICONS_PER_ROW ) * MEDIUM_MILITIA_ICON_SPACING + MAP_MILITIA_BOX_POS_X + MAP_MILITIA_MAP_X + ( ( iCounter % MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_WIDTH ) + 3; iCurrentIcon = 10;
sY = ( iCurrentTroopIcon / POPUP_MILITIA_ICONS_PER_ROW ) * ( MEDIUM_MILITIA_ICON_SPACING ) + MAP_MILITIA_BOX_POS_Y + MAP_MILITIA_MAP_Y + ( ( iCounter / MILITIA_BOX_ROWS ) * MILITIA_BOX_BOX_HEIGHT ) + 3;
if( iCurrentTroopIcon < iNumberOfGreens )
{
iCurrentIcon = 8;
}
else if( iCurrentTroopIcon < iNumberOfGreens + iNumberOfRegulars )
{
iCurrentIcon = 9;
}
else
{
iCurrentIcon = 10;
}
} }
BltVideoObject( FRAME_BUFFER, hVObject, ( UINT16 )( iCurrentIcon ), sX, sY, VO_BLT_SRCTRANSPARENCY, NULL ); BltVideoObject( FRAME_BUFFER, hVObject, ( UINT16 )( iCurrentIcon ), sX, sY, VO_BLT_SRCTRANSPARENCY, NULL );
+11 -8
View File
@@ -7092,17 +7092,20 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
case TAB: case TAB:
// go to next tab in enhanced description box // go to next tab in enhanced description box
if( InItemDescriptionBox( ) && gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] == TRUE ) if( fCtrl )
{ {
if ( gubDescBoxPage < 2 ) if( InItemDescriptionBox( ) && gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] == TRUE )
{ {
gubDescBoxPage++; if ( gubDescBoxPage < 2 )
{
gubDescBoxPage++;
}
else
{
gubDescBoxPage = 0;
}
HandleItemDescTabButton( );
} }
else
{
gubDescBoxPage = 0;
}
HandleItemDescTabButton( );
} }
break; break;