warning: initialization of item is incomplete! initialization of item's height, text static and icon still necessary
| 26 | // warning: initialization of item is incomplete! |
| 27 | // initialization of item's height, text static and icon still necessary |
| 28 | CUIPdaMsgListItem* 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 | |
| 48 | u32 CUIGameLog::GetTextColor() { return txt_color; } |
| 49 |
no test coverage detected