Skip to content

Commit

Permalink
xrGame/ui/UIPdaMsgListItem.h|cpp: SOC compatibility (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Apr 17, 2023
1 parent d8e0342 commit 5d91d0b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/xrGame/ui/UIPdaMsgListItem.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "StdAfx.h"

#include "UIPdaMsgListItem.h"
#include "xrUICore/XML/xrUIXmlParser.h"
#include "UIXmlInit.h"
#include "UIHelper.h"

void CUIPdaMsgListItem::SetFont(CGameFont* pFont)
{
Expand All @@ -19,12 +21,17 @@ void CUIPdaMsgListItem::InitPdaMsgListItem(const Fvector2& size)
AttachChild(&UIIcon);
CUIXmlInit::InitStatic(uiXml, "icon_static", 0, &UIIcon);

AttachChild(&UITimeText);
CUIXmlInit::InitTextWnd(uiXml, "time_static", 0, &UITimeText);
if (CUIXmlInit::InitTextWnd(uiXml, "time_static", 0, &UITimeText, false))
AttachChild(&UITimeText);

if (CUIXmlInit::InitTextWnd(uiXml, "caption_static", 0, &UICaptionText, false))
AttachChild(&UICaptionText);

AttachChild(&UICaptionText);
CUIXmlInit::InitTextWnd(uiXml, "caption_static", 0, &UICaptionText);
if (CUIXmlInit::InitTextWnd(uiXml, "msg_static", 0, &UIMsgText, false) ||
CUIXmlInit::InitTextWnd(uiXml, "text_static", 0, &UIMsgText, false))
{
AttachChild(&UIMsgText);
}

AttachChild(&UIMsgText);
CUIXmlInit::InitTextWnd(uiXml, "msg_static", 0, &UIMsgText);
UIHelper::CreateStatic(uiXml, "name_static", this, false);
}
5 changes: 5 additions & 0 deletions src/xrGame/ui/UIPdaMsgListItem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//////////////////////////////////////////////////////////////////////
// UIPdaMsgListItem.h: элемент окна списка в основном
// экране для сообщений PDA
//////////////////////////////////////////////////////////////////////
#pragma once

#include "xrUICore/Static/UIStatic.h"

class CUIPdaMsgListItem final : public CUIColorAnimConrollerContainer
Expand Down

0 comments on commit 5d91d0b

Please sign in to comment.