From 01e68ac2ba01c65018c9a1978993d2fc208e0481 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sat, 19 Apr 2014 10:09:33 +0000 Subject: [PATCH] Merged from revision: 7157 - Fixed inventory artefacts in widescreen (by anv) - Automatically return to team panel on turn end (better situation overview during enemy turn) (by anv) ja2_options.ini: AUTO_COLLAPSE_INVENTORY_ON_TURN_END git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7158 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 +++ GameSettings.h | 4 ++++ Tactical/Handle UI.cpp | 4 ++++ Tactical/Interface Panels.cpp | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/GameSettings.cpp b/GameSettings.cpp index 6b7ef02c..ef7177ae 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1458,6 +1458,9 @@ void LoadGameExternalOptions() // CtH/2 if the target are out of gun range or invisible for this merc gGameExternalOptions.fOutOfGunRangeOrSight = iniReader.ReadFloat("Tactical Interface Settings","OUT_OF_SIGHT_OR_GUN_RANGE",2,1,100); + + // anv: automatically return to team panel on turn end (better situation overview during enemy turn) + gGameExternalOptions.fAutoCollapseInventoryOnTurnEnd = iniReader.ReadBoolean("Tactical Interface Settings","AUTO_COLLAPSE_INVENTORY_ON_TURN_END", TRUE); // *** ddd - END // SANDRO - Improved camo applying and camo can be removed diff --git a/GameSettings.h b/GameSettings.h index 0f1e7ac1..428d5083 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -827,6 +827,10 @@ typedef struct FLOAT uWeightDivisor; FLOAT fOutOfGunRangeOrSight; + + // anv: automatically return to team panel on turn end (better situation overview during enemy turn) + BOOLEAN fAutoCollapseInventoryOnTurnEnd; + // WANNE: Always use "prof.dat". BOOLEAN fUseDifficultyBasedProfDat; diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 379cb1a8..20311157 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -1337,6 +1337,10 @@ UINT32 UIHandleEndTurn( UI_EVENT *pUIEvent ) } } + // anv: automatically return to team panel on turn end (better situation overview during enemy turn) + if( gGameExternalOptions.fAutoCollapseInventoryOnTurnEnd == TRUE ) + SetCurrentInterfacePanel( TEAM_PANEL ); + return( GAME_SCREEN ); } diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index 141d2000..d0f25361 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -2146,6 +2146,12 @@ BOOLEAN InitializeSMPanel( ) // full cursor - disable, from item pickup EnableSMPanelButtons( FALSE, TRUE ); } + + if( INTERFACE_START_X > 0 ) + { + ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, INV_INTERFACE_START_Y, SCREEN_WIDTH, SCREEN_HEIGHT, 0 ); + ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, INV_INTERFACE_START_Y, SCREEN_WIDTH, SCREEN_HEIGHT, 0 ); + } return( TRUE ); }