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

Method Render

ogsr_engine/xrGame/UI.cpp:79–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77#include "inventory.h"
78#include "huditem.h"
79bool CUI::Render()
80{
81 if (GameIndicatorsShown() /*&& psHUD_Flags.is(HUD_DRAW | HUD_DRAW_RT)*/)
82 {
83 if (pUIGame)
84 pUIGame->Render();
85 }
86
87 if (auto pActor = smart_cast<CActor*>(Level().CurrentEntity()))
88 {
89 auto item = smart_cast<CHudItem*>(pActor->inventory().ActiveItem());
90 if (item && pActor->HUDview())
91 item->OnDrawUI();
92 }
93
94 if (psHUD_Flags.is(HUD_DRAW | HUD_DRAW_RT))
95 {
96 if (GameIndicatorsShown())
97 {
98 UIMainIngameWnd->Draw();
99 m_pMessagesWnd->Draw();
100 }
101 // Оставил рендер новостей под этим условием чтобы при скриптовом скрытии ui сообщения продолжали быть видны,
102 // а при скрытии с клавиатуры - нет. Способ кривоватый но посмотрим, мб и так пойдет.
103 else if (!HUD().GetUI()->hud_disabled_by_user)
104 {
105 if (auto gSP = smart_cast<CUIGameSP*>(HUD().GetUI()->UIGame()))
106 {
107 if (!gSP->PdaMenu->GetVisible())
108 m_pMessagesWnd->Draw();
109 }
110 else
111 m_pMessagesWnd->Draw();
112 }
113 }
114
115 DoRenderDialogs();
116
117 return false;
118}
119
120bool CUI::IR_OnMouseWheel(int direction)
121{

Callers 6

RenderFontMethod · 0.45
renderMethod · 0.45
OnRenderMethod · 0.45
OnRenderMethod · 0.45
ScriptDebugRenderMethod · 0.45
DrawMethod · 0.45

Calls 8

ActiveItemMethod · 0.80
HUDviewMethod · 0.80
isMethod · 0.80
GetUIMethod · 0.80
UIGameMethod · 0.80
GetVisibleMethod · 0.80
OnDrawUIMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected