mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Bugfix: Fixed crash when showing attachment slots in EDB (strategy) and left clicking on a attachment slot (for non weapons)
o This bug was introduced when merging HAM 5 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5224 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -607,15 +607,21 @@ bool popupCallbackItemInSector(INT16 itemId){
|
|||||||
void hideAttachmentPopup(){
|
void hideAttachmentPopup(){
|
||||||
giActiveAttachmentPopup = -1;
|
giActiveAttachmentPopup = -1;
|
||||||
|
|
||||||
if (giInvDescTabButton[0] != giItemDescAmmoButton)
|
if (giItemDescAmmoButton > -1)
|
||||||
ShowButton(giItemDescAmmoButton);
|
{
|
||||||
|
if (giInvDescTabButton[0] != giItemDescAmmoButton)
|
||||||
|
ShowButton(giItemDescAmmoButton);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void hideOtherAttachmentPopups(UINT32 cnt){
|
void hideOtherAttachmentPopups(UINT32 cnt){
|
||||||
|
|
||||||
// if there's a bullet icon, hide it. It tends to overlap my popup boxes
|
// if there's a bullet icon, hide it. It tends to overlap my popup boxes
|
||||||
if (giInvDescTabButton[0] != giItemDescAmmoButton)
|
if (giItemDescAmmoButton != -1)
|
||||||
HideButton(giItemDescAmmoButton);
|
{
|
||||||
|
if (giInvDescTabButton[0] != giItemDescAmmoButton)
|
||||||
|
HideButton(giItemDescAmmoButton);
|
||||||
|
}
|
||||||
|
|
||||||
RenderItemDescriptionBox(); // also, redraw the IDB to clean up helptext
|
RenderItemDescriptionBox(); // also, redraw the IDB to clean up helptext
|
||||||
|
|
||||||
@@ -11915,7 +11921,7 @@ void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
||||||
RenderItemDescriptionBox();
|
RenderItemDescriptionBox();
|
||||||
|
|
||||||
if (giItemDescAmmoButton != -1)
|
if (giItemDescAmmoButton > -1)
|
||||||
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
||||||
|
|
||||||
ItemDescTabButtonOn( 0 );
|
ItemDescTabButtonOn( 0 );
|
||||||
@@ -11927,7 +11933,7 @@ void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
||||||
RenderItemDescriptionBox();
|
RenderItemDescriptionBox();
|
||||||
|
|
||||||
if (giItemDescAmmoButton != -1)
|
if (giItemDescAmmoButton > -1)
|
||||||
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
||||||
|
|
||||||
ItemDescTabButtonOff( 0 );
|
ItemDescTabButtonOff( 0 );
|
||||||
@@ -11939,7 +11945,7 @@ void ItemDescTabButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
||||||
RenderItemDescriptionBox();
|
RenderItemDescriptionBox();
|
||||||
|
|
||||||
if (giItemDescAmmoButton != -1)
|
if (giItemDescAmmoButton > -1)
|
||||||
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
MarkAButtonDirty( giItemDescAmmoButton ); // Required for tactical screen
|
||||||
|
|
||||||
ItemDescTabButtonOff( 0 );
|
ItemDescTabButtonOff( 0 );
|
||||||
@@ -11994,7 +12000,10 @@ void ItemDescAdvButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
||||||
RenderItemDescriptionBox();
|
RenderItemDescriptionBox();
|
||||||
// Required for tactical screen
|
// Required for tactical screen
|
||||||
MarkAButtonDirty( giItemDescAmmoButton );
|
|
||||||
|
if (giItemDescAmmoButton > -1)
|
||||||
|
MarkAButtonDirty( giItemDescAmmoButton );
|
||||||
|
|
||||||
for (INT8 x = 0; x < 3; x++)
|
for (INT8 x = 0; x < 3; x++)
|
||||||
{
|
{
|
||||||
if (giInvDescTabButton[x] != -1)
|
if (giInvDescTabButton[x] != -1)
|
||||||
@@ -12012,7 +12021,9 @@ void ItemDescAdvButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
InternalInitEDBTooltipRegion( gpItemDescObject, guiCurrentItemDescriptionScreen );
|
||||||
RenderItemDescriptionBox();
|
RenderItemDescriptionBox();
|
||||||
// Required for tactical screen
|
// Required for tactical screen
|
||||||
MarkAButtonDirty( giItemDescAmmoButton );
|
if (giItemDescAmmoButton > -1)
|
||||||
|
MarkAButtonDirty( giItemDescAmmoButton );
|
||||||
|
|
||||||
for (INT8 x = 0; x < 3; x++)
|
for (INT8 x = 0; x < 3; x++)
|
||||||
{
|
{
|
||||||
if (giInvDescTabButton[x] != -1)
|
if (giInvDescTabButton[x] != -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user