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

Method StartMenu

ogsr_engine/xrGame/UIDialogHolder.cpp:42–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include "HUDManager.h"
41
42void CDialogHolder::StartMenu(CUIDialogWnd* pDialog, bool bDoHideIndicators)
43{
44 R_ASSERT(!pDialog->IsShown());
45
46 if (MainInputReceiver() && GetUICursor()->IsVisible())
47 {
48 // предыдущий диалог теряет фокус
49 MainInputReceiver()->UpdateFocus(true);
50 MainInputReceiver()->CommitFocus(true);
51 }
52
53 AddDialogToRender(pDialog);
54 SetMainInputReceiver(pDialog, false);
55
56 if (UseIndicators())
57 {
58 bool b = !!psHUD_Flags.test(HUD_CROSSHAIR_RT);
59 m_input_receivers.back().m_flags.set(recvItem::eCrosshair, b);
60
61 b = HUD().GetUI()->GameIndicatorsShown();
62 m_input_receivers.back().m_flags.set(recvItem::eIndicators, b);
63
64 if (bDoHideIndicators)
65 {
66 psHUD_Flags.set(HUD_CROSSHAIR_RT, FALSE);
67 HUD().GetUI()->HideGameIndicators();
68 }
69 }
70 pDialog->SetHolder(this);
71 pDialog->Show();
72
73 if (pDialog->NeedCursor())
74 GetUICursor()->Show();
75
76 if (g_pGameLevel)
77 {
78 CActor* A = smart_cast<CActor*>(Level().CurrentViewEntity());
79 if (A && pDialog->StopAnyMove())
80 {
81 A->StopAnyMove();
82 };
83 if (A)
84 {
85 A->PickupModeOff();
86 A->IR_OnKeyboardRelease(kWPN_ZOOM);
87 A->IR_OnKeyboardRelease(kWPN_FIRE);
88 }
89 }
90}
91
92void CDialogHolder::StopMenu(CUIDialogWnd* pDialog)
93{

Callers

nothing calls this directly

Calls 15

GetUICursorFunction · 0.85
IsShownMethod · 0.80
UpdateFocusMethod · 0.80
CommitFocusMethod · 0.80
GameIndicatorsShownMethod · 0.80
GetUIMethod · 0.80
HideGameIndicatorsMethod · 0.80
SetHolderMethod · 0.80
NeedCursorMethod · 0.80
PickupModeOffMethod · 0.80
IsVisibleMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected