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

Method SetMainInputReceiver

ogsr_engine/xrGame/UIDialogHolder.cpp:172–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170};
171
172void CDialogHolder::SetMainInputReceiver(CUIDialogWnd* ir, bool _find_remove, const Flags8 flags)
173{
174 if (MainInputReceiver() == ir)
175 return;
176
177 if (!ir || _find_remove)
178 {
179 if (m_input_receivers.empty())
180 return;
181
182 if (!ir)
183 m_input_receivers.pop_back();
184 else
185 {
186 VERIFY(ir && _find_remove);
187
188 u32 cnt = m_input_receivers.size();
189 for (; cnt > 0; --cnt)
190 if (m_input_receivers[cnt - 1].m_item == ir)
191 {
192 m_input_receivers[cnt].m_flags.set(recvItem::eCrosshair, m_input_receivers[cnt - 1].m_flags.test(recvItem::eCrosshair));
193 m_input_receivers[cnt].m_flags.set(recvItem::eIndicators, m_input_receivers[cnt - 1].m_flags.test(recvItem::eIndicators));
194 xr_vector<recvItem>::iterator it = m_input_receivers.begin();
195 std::advance(it, cnt - 1);
196 m_input_receivers.erase(it);
197 break;
198 }
199 }
200 }
201 else
202 {
203 m_input_receivers.emplace_back(ir);
204 if (!flags.equal(Flags8{}))
205 m_input_receivers.back().m_flags = flags;
206 }
207};
208//. #include "ai_space.h"
209//. #include "script_engine.h"
210void CDialogHolder::StartStopMenu(CUIDialogWnd* pDialog, bool bDoHideIndicators)

Callers 5

IR_OnKeyboardPressMethod · 0.80
ShowHidePdaMethod · 0.80
OnCancelMethod · 0.80
OnMouseMethod · 0.80
OnKeyboardMethod · 0.80

Calls 10

advanceFunction · 0.50
emptyMethod · 0.45
pop_backMethod · 0.45
sizeMethod · 0.45
setMethod · 0.45
testMethod · 0.45
beginMethod · 0.45
eraseMethod · 0.45
equalMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected