Prevented the game trying to delete an already deleted button when leaving mapscreen and fixed visual bug for popup boxes drawing in item description box in widescreen UI (by Asdow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9276 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2022-01-25 22:24:53 +00:00
parent bc8fac5c3e
commit be14552e32
2 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -1309,7 +1309,8 @@ void RemoveButton(INT32 iButtonID)
if( gfIgnoreShutdownAssertions )
#endif
return;
AssertMsg( 0, "Attempting to remove a button that has already been deleted." );
sprintf(str, "Attempting to remove a button that has already been deleted. ButtonID %d", iButtonID);
AssertMsg( 0, str );
}
//If we happen to be in the middle of a callback, and attempt to delete a button,
+7 -3
View File
@@ -9359,8 +9359,8 @@ void CreateMapCharInvIOregions()
// Create trashcan and keyring buttons
fShowInventoryFlag = TRUE;
CreateDestroyTrashCanRegion();
// Remove map inventory button, since widescreen res always has character inventory visible
RemoveButton(giMapInvDoneButton);
// Disable map inventory button, since widescreen res always has character inventory visible
DisableButton(giMapInvDoneButton);
fShowInventoryFlag = FALSE;
}
@@ -12148,7 +12148,11 @@ void RenderCharacterInventoryWideScreen(void)
if (!gfItemDescTransformPopupVisible)
{
BltCharInvPanel();
RestoreExternBackgroundRect(UI_CHARINV.Region);
MarkAllBoxesAsAltered();
if (!InItemDescriptionBox())
{
RestoreExternBackgroundRect(UI_CHARINV.Region);
}
}
}