diff --git a/src/xrGame/ui/UIDialogWnd.cpp b/src/xrGame/ui/UIDialogWnd.cpp index 3ac867e2725..1d70459520b 100644 --- a/src/xrGame/ui/UIDialogWnd.cpp +++ b/src/xrGame/ui/UIDialogWnd.cpp @@ -49,6 +49,14 @@ bool CUIDialogWnd::IR_process() CDialogHolder* CurrentDialogHolder(); +void CUIDialogWnd::ShowOrHideDialog(bool bDoHideIndicators) +{ + if (IsShown()) + GetHolder()->StopDialog(this); + else + CurrentDialogHolder()->StartDialog(this, bDoHideIndicators); +} + void CUIDialogWnd::ShowDialog(bool bDoHideIndicators) { if (!IsShown()) diff --git a/src/xrGame/ui/UIDialogWnd.h b/src/xrGame/ui/UIDialogWnd.h index 20c152b5d7d..dfb46a04f3e 100644 --- a/src/xrGame/ui/UIDialogWnd.h +++ b/src/xrGame/ui/UIDialogWnd.h @@ -28,6 +28,7 @@ class CUIDialogWnd : public CUIWindow virtual bool NeedCenterCursor() const { return true; } virtual bool WorkInPause() const { return m_bWorkInPause; } virtual bool Dispatch(int cmd, int param) { return true; } + virtual void ShowOrHideDialog(bool bDoHideIndicators); virtual void ShowDialog(bool bDoHideIndicators); virtual void HideDialog(); diff --git a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp index f3f9858f839..aba37a18eed 100644 --- a/src/xrGame/ui/UIGameTutorialSimpleItem.cpp +++ b/src/xrGame/ui/UIGameTutorialSimpleItem.cpp @@ -289,7 +289,7 @@ void CUISequenceSimpleItem::Start() } if ((!pda.IsShown() && bShowPda) || (pda.IsShown() && !bShowPda)) - pda.HideDialog(); + pda.ShowOrHideDialog(true); } }