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

Method AddIconedPdaMessage

ogsr_engine/xrGame/ui/UIMessagesWindow.cpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void CUIMessagesWindow::AddIconedPdaMessage(LPCSTR textureName, Frect originalRect, LPCSTR message, int iDelay)
43{
44 CUIPdaMsgListItem* pItem = m_pGameLog->AddPdaMessage(message, float(iDelay));
45 pItem->SetTextComplexMode(true);
46 pItem->UIIcon.InitTexture(textureName);
47 pItem->UIIcon.SetOriginalRect(originalRect.left, originalRect.top, originalRect.right, originalRect.bottom);
48 pItem->UIMsgText.SetWndPos(pItem->UIIcon.GetWidth(), pItem->UIMsgText.GetWndPos().y);
49 pItem->UIMsgText.AdjustHeightToText();
50
51 if (pItem->UIIcon.GetHeight() > pItem->UIMsgText.GetHeight())
52 pItem->SetHeight(pItem->UIIcon.GetHeight());
53 else
54 pItem->SetHeight(pItem->UIMsgText.GetHeight());
55 m_pGameLog->SendMessage(pItem, CHILD_CHANGED_SIZE);
56}
57
58void CUIMessagesWindow::Update() { CUIWindow::Update(); }

Callers 1

ReceiveNewsMethod · 0.80

Calls 11

AddPdaMessageMethod · 0.80
GetWidthMethod · 0.80
GetWndPosMethod · 0.80
AdjustHeightToTextMethod · 0.80
GetHeightMethod · 0.80
SetTextComplexModeMethod · 0.45
InitTextureMethod · 0.45
SetOriginalRectMethod · 0.45
SetWndPosMethod · 0.45
SetHeightMethod · 0.45
SendMessageMethod · 0.45

Tested by

no test coverage detected