MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / StopMenu

Method StopMenu

ogsr_engine/xrGame/UIDialogHolder.cpp:92–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void 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
131void CDialogHolder::AddDialogToRender(CUIWindow* pDialog)
132{

Callers

nothing calls this directly

Calls 14

GetUICursorFunction · 0.85
IsShownMethod · 0.80
UpdateFocusMethod · 0.80
CommitFocusMethod · 0.80
ShowGameIndicatorsMethod · 0.80
GetUIMethod · 0.80
HideGameIndicatorsMethod · 0.80
SetHolderMethod · 0.80
NeedCursorMethod · 0.80
IsVisibleMethod · 0.45
testMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected