diff --git a/Source/control.cpp b/Source/control.cpp index 4a08420bd..c6bad2f64 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -769,11 +769,13 @@ void CheckBtnUp() switch (i) { case PanelButtonCharinfo: QuestLogIsOpen = false; + CloseGoldWithdraw(); IsStashOpen = false; chrflag = !chrflag; break; case PanelButtonQlog: chrflag = false; + CloseGoldWithdraw(); IsStashOpen = false; if (!QuestLogIsOpen) StartQuestlog(); @@ -790,6 +792,7 @@ void CheckBtnUp() break; case PanelButtonInventory: sbookflag = false; + CloseGoldWithdraw(); IsStashOpen = false; invflag = !invflag; if (dropGoldFlag) { @@ -915,6 +918,7 @@ void ReleaseLvlBtn() auto &mainPanelPosition = GetMainPanel().position; if (MousePosition.x >= 40 + mainPanelPosition.x && MousePosition.x <= 81 + mainPanelPosition.x && MousePosition.y >= -39 + mainPanelPosition.y && MousePosition.y <= -17 + mainPanelPosition.y) { QuestLogIsOpen = false; + CloseGoldWithdraw(); IsStashOpen = false; chrflag = true; } diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 2890a471a..8d97d7ad2 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -224,6 +224,7 @@ void LeftMouseCmd(bool bShift) assert(MousePosition.y < GetMainPanel().position.y || MousePosition.x < GetMainPanel().position.x || MousePosition.x >= GetMainPanel().position.x + PANEL_WIDTH); if (leveltype == DTYPE_TOWN) { + CloseGoldWithdraw(); IsStashOpen = false; if (pcursitem != -1 && pcurs == CURSOR_HAND) NetSendCmdLocParam1(true, invflag ? CMD_GOTOGETITEM : CMD_GOTOAGETITEM, cursPosition, pcursitem); @@ -1334,6 +1335,7 @@ void InventoryKeyPressed() } } sbookflag = false; + CloseGoldWithdraw(); IsStashOpen = false; } @@ -1354,6 +1356,7 @@ void CharacterSheetKeyPressed() } } QuestLogIsOpen = false; + CloseGoldWithdraw(); IsStashOpen = false; } @@ -1378,6 +1381,7 @@ void QuestLogKeyPressed() } } chrflag = false; + CloseGoldWithdraw(); IsStashOpen = false; } diff --git a/Source/inv.cpp b/Source/inv.cpp index 0ca60dd6e..3299cbe44 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -2171,6 +2171,7 @@ bool UseInvItem(int pnum, int cii) void CloseInventory() { + CloseGoldWithdraw(); IsStashOpen = false; invflag = false; } diff --git a/Source/miniwin/misc_msg.cpp b/Source/miniwin/misc_msg.cpp index e410693a4..50a5f98fe 100644 --- a/Source/miniwin/misc_msg.cpp +++ b/Source/miniwin/misc_msg.cpp @@ -342,6 +342,7 @@ void ProcessGamepadEvents(GameAction &action) chrflag = false; QuestLogIsOpen = false; sbookflag = false; + CloseGoldWithdraw(); IsStashOpen = false; } break; @@ -349,6 +350,7 @@ void ProcessGamepadEvents(GameAction &action) chrflag = !chrflag; if (chrflag) { QuestLogIsOpen = false; + CloseGoldWithdraw(); IsStashOpen = false; spselflag = false; if (pcurs == CURSOR_DISARM) @@ -360,6 +362,7 @@ void ProcessGamepadEvents(GameAction &action) if (!QuestLogIsOpen) { StartQuestlog(); chrflag = false; + CloseGoldWithdraw(); IsStashOpen = false; spselflag = false; } else {