Skip to content

Commit

Permalink
Port changes from OGSR - cellItem xml optimization; improves OpenXRay…
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Dec 18, 2024
1 parent f8b0f34 commit bfd47c1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/xrGame/ui/UICellItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ CUICellItem::~CUICellItem()

void CUICellItem::init()
{
CUIXml uiXml;
if (!uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "actor_menu_item.xml", false))
return;
static CUIXml uiXml;
static bool isXmlReady = false;
if (!isXmlReady)
{
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "actor_menu_item.xml", false);
isXmlReady = true;
}

m_text = xr_new<CUIStatic>("Text");
m_text->SetAutoDelete(true);
Expand Down

0 comments on commit bfd47c1

Please sign in to comment.