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

Method AddPdaMessage

ogsr_engine/xrGame/ui/UIGameLog.cpp:28–46  ·  view source on GitHub ↗

warning: initialization of item is incomplete! initialization of item's height, text static and icon still necessary

Source from the content-addressed store, hash-verified

26// warning: initialization of item is incomplete!
27// initialization of item's height, text static and icon still necessary
28CUIPdaMsgListItem* CUIGameLog::AddPdaMessage(LPCSTR msg, float delay)
29{
30 u32 curr_size = GetSize();
31
32 CUIPdaMsgListItem* pItem = xr_new<CUIPdaMsgListItem>();
33 pItem->Init(0, 0, GetDesiredChildWidth(), 10); // fake height
34 pItem->UIMsgText.SetTextST(msg);
35 pItem->SetClrAnimDelay(delay);
36 pItem->SetClrLightAnim(CHAT_LOG_ITEMS_ANIMATION, false, true, true, true);
37 AddWindow(pItem, true);
38
39 if (curr_size == 0)
40 {
41 const Fvector2 w_pos = m_pad->GetWndPos();
42 m_pad->SetWndPos(w_pos.x, GetHeight());
43 }
44
45 return pItem;
46}
47
48u32 CUIGameLog::GetTextColor() { return txt_color; }
49

Callers 1

AddIconedPdaMessageMethod · 0.80

Calls 8

SetTextSTMethod · 0.80
SetClrAnimDelayMethod · 0.80
SetClrLightAnimMethod · 0.80
GetWndPosMethod · 0.80
GetSizeFunction · 0.50
GetHeightFunction · 0.50
InitMethod · 0.45
SetWndPosMethod · 0.45

Tested by

no test coverage detected