| 77 | #include "inventory.h" |
| 78 | #include "huditem.h" |
| 79 | bool 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 | |
| 120 | bool CUI::IR_OnMouseWheel(int direction) |
| 121 | { |
no test coverage detected