diff --git a/MainMenuScreen.cpp b/MainMenuScreen.cpp index 1efc1750..4afe228e 100644 --- a/MainMenuScreen.cpp +++ b/MainMenuScreen.cpp @@ -515,6 +515,12 @@ void HandleMainMenuInput() SetMainMenuExitScreen( INIT_SCREEN ); break; + case 'm': + gbHandledMainMenu = NEW_MP_GAME; + gfMainMenuScreenExit = TRUE; + SetMainMenuExitScreen( MP_JOIN_SCREEN ); + break; + case 'i': SetPendingNewScreen( INTRO_SCREEN ); gfMainMenuScreenExit = TRUE; diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index ea210186..2b211e84 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -7089,6 +7089,22 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) StopAnyCurrentlyTalkingSpeech( ); break; + case TAB: + // go to next tab in enhanced description box + if( InItemDescriptionBox( ) && gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] == TRUE ) + { + if ( gubDescBoxPage < 2 ) + { + gubDescBoxPage++; + } + else + { + gubDescBoxPage = 0; + } + HandleItemDescTabButton( ); + } + break; + case F1: case F2: case F3: diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 21b9731d..be0a9094 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -12457,40 +12457,31 @@ void DeletePool(ITEM_POOL *pItemPool) void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason ) { - switch (btn->UserData[0]) - { - case 0: - gubDescBoxPage = 0; - InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen ); - RenderItemDescriptionBox(); + gubDescBoxPage = btn->UserData[0]; + HandleItemDescTabButton( ); +} - if (giItemDescAmmoButton > -1) - MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen - +void HandleItemDescTabButton( ) +{ + InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen ); + RenderItemDescriptionBox(); + + if (giItemDescAmmoButton > -1) + MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen + + switch (gubDescBoxPage) + { + case 0: ItemDescTabButtonOn( 0 ); ItemDescTabButtonOff( 1 ); ItemDescTabButtonOff( 2 ); break; case 1: - gubDescBoxPage = 1; - InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen ); - RenderItemDescriptionBox(); - - if (giItemDescAmmoButton > -1) - MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen - ItemDescTabButtonOff( 0 ); ItemDescTabButtonOn( 1 ); ItemDescTabButtonOff( 2 ); break; case 2: - gubDescBoxPage = 2; - InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen ); - RenderItemDescriptionBox(); - - if (giItemDescAmmoButton > -1) - MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen - ItemDescTabButtonOff( 0 ); ItemDescTabButtonOff( 1 ); ItemDescTabButtonOn( 2 ); diff --git a/Tactical/Interface Items.h b/Tactical/Interface Items.h index 1ba19a92..b085bf37 100644 --- a/Tactical/Interface Items.h +++ b/Tactical/Interface Items.h @@ -254,6 +254,7 @@ void DeleteItemDescriptionBox( ); extern BOOLEAN UseNASDesc(OBJECTTYPE *pObject); INT16 sNASXCorrection(OBJECTTYPE * pObject); INT16 sNASYCorrection(OBJECTTYPE * pObject); +void HandleItemDescTabButton( ); BOOLEAN InItemStackPopup( ); BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX, INT16 sInvY, INT16 sInvWidth, INT16 sInvHeight ); diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index b93d45fc..61ba194a 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -2090,8 +2090,21 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) break; case TAB: + // go to next tab in enhanced description box + if( ( fCtrl ) && InItemDescriptionBox( ) && gGameSettings.fOptions[ TOPTION_ENHANCED_DESC_BOX ] == TRUE ) + { + if ( gubDescBoxPage < 2 ) + { + gubDescBoxPage++; + } + else + { + gubDescBoxPage = 0; + } + HandleItemDescTabButton( ); + } // nothing in hand and either not in SM panel, or the matching button is enabled if we are in SM panel - if ( ( gpItemPointer == NULL ) && + else if ( ( gpItemPointer == NULL ) && ( ( gsCurInterfacePanel != SM_PANEL ) || ( ButtonList[ iSMPanelButtons[ UPDOWN_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) ) { UIHandleChangeLevel( NULL );