mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Brief: //dnl ch78
- Some mapeditor cosmetic and CTD fixes. Details: - Fix sticky tooltip if perform scroll or go to 'Sector Summary' window. - Fix accidental mercid delete from textbox if press any key while in 'Profile ID mode'. - Fix CTD from release if several time swap from RND to any other item button. - Disable some enabled buttons and mouse area from taskbar when 'Sector Summary' windows is active. - Checkbox toggles from Mercs bar now remember their state after switching to another taskbar option. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6657 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -45,14 +45,12 @@
|
||||
#include "Soldier Find.h"
|
||||
#include "lighting.h"
|
||||
#include "Keys.h"
|
||||
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "renderworld.h"//dnl ch78 271113
|
||||
#endif
|
||||
|
||||
void RenderEditorInfo();
|
||||
|
||||
//extern ITEM_POOL *gpItemPool;//dnl ch26 210909
|
||||
|
||||
//editor icon storage vars
|
||||
INT32 giEditMercDirectionIcons[2];
|
||||
UINT32 guiMercInventoryPanel;
|
||||
@@ -91,7 +89,7 @@ void DisableEditorRegion( INT8 bRegionID )
|
||||
switch( bRegionID )
|
||||
{
|
||||
case BASE_TERRAIN_TILE_REGION_ID:
|
||||
case 1: case 2: case 3: case 4: case 5: case 6: case 7:
|
||||
case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8://dnl ch78 261113
|
||||
MSYS_DisableRegion( &TerrainTileButtonRegion[ bRegionID ] );
|
||||
break;
|
||||
case ITEM_REGION_ID:
|
||||
@@ -345,6 +343,17 @@ void DoTaskbar(void)
|
||||
SetMercEditingMode( MERC_TEAMMODE );
|
||||
fBuildingShowRoofs = FALSE;
|
||||
UpdateRoofsView();
|
||||
//dnl ch78 261113
|
||||
if(gfShowPlayers)
|
||||
ClickEditorButton(MERCS_PLAYERTOGGLE);
|
||||
if(gfShowEnemies)
|
||||
ClickEditorButton(MERCS_ENEMYTOGGLE);
|
||||
if(gfShowCreatures)
|
||||
ClickEditorButton(MERCS_CREATURETOGGLE);
|
||||
if(gfShowRebels)
|
||||
ClickEditorButton(MERCS_REBELTOGGLE);
|
||||
if(gfShowCivilians)
|
||||
ClickEditorButton(MERCS_CIVILIANTOGGLE);
|
||||
break;
|
||||
case TASK_TERRAIN:
|
||||
ClickEditorButton( TAB_TERRAIN );
|
||||
@@ -1052,9 +1061,8 @@ void ProcessEditorRendering()
|
||||
//It is set to false when before we save the buffer, so the buttons don't get
|
||||
//rendered with hilites, in case the mouse is over one.
|
||||
gfRenderHilights = TRUE;
|
||||
if(!gfSummaryWindowActive)//dnl ch77 131113
|
||||
if(!gfSummaryWindowActive && !gfScrollInertia)//dnl ch77 131113 //dnl ch78 271113
|
||||
RenderButtonsFastHelp();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -323,8 +323,8 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
||||
return;
|
||||
}
|
||||
//Allocate memory to store all the item pointers.
|
||||
eInfo.pusItemIndex = (UINT16*)MemAlloc( sizeof(UINT16) * eInfo.sNumItems );
|
||||
|
||||
if(eInfo.sNumItems)//dnl ch78 271113
|
||||
eInfo.pusItemIndex = (UINT16*)MemAlloc( sizeof(UINT16) * eInfo.sNumItems );
|
||||
//Disable the appropriate scroll buttons based on the saved scroll index if applicable
|
||||
//Left most scroll position
|
||||
DetermineItemsScrolling();
|
||||
|
||||
@@ -1773,7 +1773,7 @@ void SetupTextInputForMercProfile()
|
||||
INT16 sNum;
|
||||
|
||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||
|
||||
AddUserInputField(NULL);//dnl ch78 271113 to avoid automatic textbox selection and enable shortcut keys while not typing
|
||||
sNum = gpSelected->pDetailedPlacement->ubProfile;
|
||||
if( sNum == NO_PROFILE )
|
||||
str[0] = '\0';
|
||||
@@ -1887,7 +1887,7 @@ void ExtractAndUpdateMercProfile()
|
||||
|
||||
//if the string is blank, returning -1, then set the value to NO_PROFILE
|
||||
//because ubProfile is unsigned.
|
||||
sNum = (INT16)min( GetNumericStrictValueFromField( 0 ), NUM_PROFILES-1 );//dnl ch54 101009
|
||||
sNum = (INT16)min(GetNumericStrictValueFromField(1), NUM_PROFILES-1);//dnl ch54 101009 //dnl ch78 271113
|
||||
if( sNum == -1 )
|
||||
{
|
||||
gpSelected->pDetailedPlacement->ubProfile = NO_PROFILE;
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "GameVersion.h"
|
||||
#include "Campaign Types.h"
|
||||
#include "GameSettings.h"
|
||||
#include "EditorTerrain.h"//dnl ch78 261113
|
||||
#include "Render Dirty.h"//dnl ch78 271113
|
||||
#endif
|
||||
|
||||
#include <vfs/Core/vfs.h>
|
||||
@@ -271,6 +273,10 @@ void CreateSummaryWindow()
|
||||
|
||||
DisableEditorTaskbar();
|
||||
DisableAllTextFields();
|
||||
//dnl ch78 261113
|
||||
HideTerrainTileButtons();
|
||||
DisableEditorRegion(ITEM_REGION_ID);
|
||||
RestoreBackgroundRects();
|
||||
|
||||
GetCurrentWorldSector( &gsSectorX, &gsSectorY );
|
||||
gsSelSectorX = gsSectorX;
|
||||
@@ -480,6 +486,11 @@ void DestroySummaryWindow()
|
||||
KillTextInputMode();
|
||||
EnableEditorTaskbar();
|
||||
EnableAllTextFields();
|
||||
//dnl ch78 261113
|
||||
if(iCurrentTaskbar == TASK_TERRAIN)
|
||||
ShowTerrainTileButtons();
|
||||
else if(iCurrentTaskbar == TASK_ITEMS)
|
||||
EnableEditorRegion(ITEM_REGION_ID);
|
||||
|
||||
if( gpWorldItemsSummaryArray )
|
||||
{
|
||||
|
||||
@@ -2168,6 +2168,10 @@ void HandleKeyboardShortcuts( )
|
||||
gfRenderWorld = TRUE;
|
||||
}
|
||||
break;
|
||||
#ifdef dnlTEST
|
||||
case '\'':
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
iCurrentAction = ACTION_NULL;
|
||||
break;
|
||||
@@ -4614,7 +4618,8 @@ UINT32 EditScreenHandle( void )
|
||||
// If editing mercs, handle that stuff
|
||||
ProcessMercEditing();
|
||||
|
||||
EnsureStatusOfEditorButtons();
|
||||
if(!gfSummaryWindowActive)//dnl ch78 261113
|
||||
EnsureStatusOfEditorButtons();
|
||||
|
||||
// Handle scrolling of the map if needed
|
||||
if( !gfGotoGridNoUI && !gfKeyboardItemCreationUI && iDrawMode != DRAW_MODE_SHOW_TILESET && !gfSummaryWindowActive &&
|
||||
|
||||
@@ -3778,9 +3778,10 @@ void ScrollWorld( )
|
||||
// If here, set scroll pending to false
|
||||
gfScrollPending = FALSE;
|
||||
|
||||
|
||||
// INcrement scroll intertia
|
||||
gfScrollInertia++;
|
||||
if(gfScrollInertia == 1)//dnl ch78 271113
|
||||
RestoreBackgroundRects();
|
||||
|
||||
// Now we actually begin our scrolling
|
||||
HandleScrollDirections( ScrollFlags, sScrollXStep, sScrollYStep, &sTempRenderCenterX, &sTempRenderCenterY, FALSE );
|
||||
|
||||
Reference in New Issue
Block a user