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

Method Hide

ogsr_engine/xrGame/ui/UIInventoryWnd.cpp:353–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353void CUIInventoryWnd::Hide()
354{
355 PlaySnd(eInvSndClose);
356 inherited::Hide();
357
358 SendInfoToActor("ui_inventory_hide");
359 ClearAllLists();
360
361 //достать вещь в активный слот
362 CActor* pActor = smart_cast<CActor*>(Level().CurrentEntity());
363 if (pActor && m_iCurrentActiveSlot != NO_ACTIVE_SLOT && pActor->inventory().m_slots[m_iCurrentActiveSlot].m_pIItem)
364 {
365 pActor->inventory().Activate(m_iCurrentActiveSlot);
366 m_iCurrentActiveSlot = NO_ACTIVE_SLOT;
367 }
368
369 if (Core.Features.test(xrCore::Feature::more_hide_weapon))
370 if (pActor)
371 pActor->SetWeaponHideState(INV_STATE_INV_WND, false);
372
373 HideSlotsHighlight();
374}
375
376void CUIInventoryWnd::HideSlotsHighlight()
377{

Callers 2

InitMethod · 0.45
OnMouseMethod · 0.45

Calls 3

SetWeaponHideStateMethod · 0.80
ActivateMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected