Skip to content

Commit

Permalink
Fixed "How to use PDA" tutorial being always hidden (#382, #392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Mar 10, 2020
1 parent 91002c0 commit c36d59e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/xrGame/ui/UIDialogWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/ui/UIDialogWnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIGameTutorialSimpleItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void CUISequenceSimpleItem::Start()
}

if ((!pda.IsShown() && bShowPda) || (pda.IsShown() && !bShowPda))
pda.HideDialog();
pda.ShowOrHideDialog(true);
}
}

Expand Down

0 comments on commit c36d59e

Please sign in to comment.