| 90 | } |
| 91 | |
| 92 | void CDialogHolder::StopMenu(CUIDialogWnd* pDialog) |
| 93 | { |
| 94 | R_ASSERT(pDialog->IsShown()); |
| 95 | |
| 96 | if (MainInputReceiver() == pDialog) |
| 97 | { |
| 98 | if (GetUICursor()->IsVisible()) |
| 99 | { |
| 100 | // текущий диалог теряет фокус |
| 101 | pDialog->UpdateFocus(true); |
| 102 | pDialog->CommitFocus(true); |
| 103 | } |
| 104 | if (UseIndicators()) |
| 105 | { |
| 106 | bool b = !!m_input_receivers.back().m_flags.test(recvItem::eCrosshair); |
| 107 | psHUD_Flags.set(HUD_CROSSHAIR_RT, b); |
| 108 | b = !!m_input_receivers.back().m_flags.test(recvItem::eIndicators); |
| 109 | if (b) |
| 110 | HUD().GetUI()->ShowGameIndicators(); |
| 111 | else |
| 112 | HUD().GetUI()->HideGameIndicators(); |
| 113 | } |
| 114 | RemoveDialogToRender(pDialog); |
| 115 | SetMainInputReceiver(nullptr, false); |
| 116 | pDialog->SetHolder(nullptr); |
| 117 | pDialog->Hide(); |
| 118 | } |
| 119 | else |
| 120 | { |
| 121 | RemoveDialogToRender(pDialog); |
| 122 | SetMainInputReceiver(pDialog, true); |
| 123 | pDialog->SetHolder(nullptr); |
| 124 | pDialog->Hide(); |
| 125 | } |
| 126 | |
| 127 | if (!MainInputReceiver() || !MainInputReceiver()->NeedCursor()) |
| 128 | GetUICursor()->Hide(); |
| 129 | } |
| 130 | |
| 131 | void CDialogHolder::AddDialogToRender(CUIWindow* pDialog) |
| 132 | { |
nothing calls this directly
no test coverage detected