Skip to content

Commit

Permalink
UI Styles: check current style path and default path when searching xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Sep 23, 2018
1 parent c3ced77 commit b39957d
Show file tree
Hide file tree
Showing 58 changed files with 99 additions and 72 deletions.
2 changes: 1 addition & 1 deletion src/xrGame/EliteDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void CUIArtefactDetectorElite::construct(CEliteDetector* p)
{
m_parent = p;
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_detector_artefact.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_detector_artefact.xml");

CUIXmlInit xml_init;
string512 buff;
Expand Down
45 changes: 37 additions & 8 deletions src/xrGame/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <shellapi.h>
#pragma comment(lib, "shell32.lib")

#include <tbb/parallel_for_each.h>

#include "Common/object_broker.h"

#include "account_manager.h"
Expand Down Expand Up @@ -150,16 +152,43 @@ CMainMenu::~CMainMenu()
void CMainMenu::ReadTextureInfo()
{
string_path buf;
FS_FileSet fset;
FS.file_list(fset, "$game_config$", FS_ListFiles, strconcat(sizeof(buf), buf, UI_PATH, "\\", "textures_descr\\*.xml"));
for (const auto& file : fset)
FS_FileSet files;

const auto UpdateFileSet = [&](pcstr path)
{
string_path fn1, fn2, fn3;
_splitpath(file.name.c_str(), fn1, fn2, fn3, 0);
xr_strcat(fn3, ".xml");
FS.file_list(files, "$game_config$", FS_ListFiles,
strconcat(sizeof(buf), buf, path, "\\", "textures_descr\\*.xml")
);
};

CUITextureMaster::ParseShTexInfo(fn3);
}
const auto ParseFileSet = [&]()
{
/*
* Original CoP textures_descr
* loading time:
* Single-threaded ~80 ms
* Multi-threaded ~40 ms
* Just a bit of speedup
*/
tbb::parallel_for_each(files, [](const FS_File& file)
{
string_path path, name;
_splitpath(file.name.c_str(), nullptr, path, name, nullptr);
xr_strcat(name, ".xml");
path[xr_strlen(path) - 1] = '\0'; // cut the latest '\\'

CUITextureMaster::ParseShTexInfo(path, name);
});
};

UpdateFileSet(UI_PATH_DEFAULT);
ParseFileSet();

if (0 == xr_strcmp(UI_PATH, UI_PATH_DEFAULT))
return;

UpdateFileSet(UI_PATH);
ParseFileSet();
}

void CMainMenu::Activate(bool bActivate)
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Missile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void create_force_progress()
{
VERIFY(!g_MissileForceShape);
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "grenade.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "grenade.xml");

CUIXmlInit xml_init;
g_MissileForceShape = new CUIProgressShape();
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ScriptXMLInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void _attach_child(CUIWindow* _child, CUIWindow* _parent)
_parent->AttachChild(_child);
}

void CScriptXmlInit::ParseFile(LPCSTR xml_file) { m_xml.Load(CONFIG_PATH, UI_PATH, xml_file); }
void CScriptXmlInit::ParseFile(LPCSTR xml_file) { m_xml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_file); }
void CScriptXmlInit::InitWindow(LPCSTR path, int index, CUIWindow* pWnd)
{
CUIXmlInit::InitWindow(m_xml, path, index, pWnd);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UIAchivementsIndicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CUIAchivementIndicator::CUIAchivementIndicator()
m_achivement_log = new CUIGameLog();
AttachChild(m_achivement_log);
CUIXml tmp_xml;
tmp_xml.Load(CONFIG_PATH, UI_PATH, "ui_mp_achivements.xml");
tmp_xml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_mp_achivements.xml");
CUIXmlInit::InitWindow(tmp_xml, "mp_achivement_wnd", 0, this);
CUIXmlInit::InitScrollView(tmp_xml, "mp_achivement_wnd:achivement_list", 0, m_achivement_log);
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UIGameAHunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void CUIGameAHunt::Init(int stage)
m_pTeamPanels->Init(TEAM_PANELS_AHUNT_XML_NAME, "team_panels_wnd");

CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_ahunt.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_game_ahunt.xml");

CUIXmlInit::InitWindow(uiXml, "global", 0, Window);
CUIXmlInit::InitTextWnd(uiXml, "fraglimit", 0, m_pFragLimitIndicator);
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/UIGameCTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void CUIGameCTA::Init(int stage)
teamPanels->Init(TEAM_PANELS_XML_NAME, "team_panels_wnd");

CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, CTA_GAME_WND_XML);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, CTA_GAME_WND_XML);

CUIXmlInit::InitWindow(uiXml, "global", 0, Window);

Expand Down Expand Up @@ -761,7 +761,7 @@ void CUIGameCTA::SetVoteMessage(LPCSTR str)
if (str)
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_dm.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_game_dm.xml");
m_voteStatusWnd = new UIVoteStatusWnd();
m_voteStatusWnd->InitFromXML(uiXml);
m_voteStatusWnd->Show(true);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UIGameCustom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void CUIGameCustom::Load()
return;
R_ASSERT(!MsgConfig);
MsgConfig = new CUIXml();
MsgConfig->Load(CONFIG_PATH, UI_PATH, "ui_custom_msgs.xml");
MsgConfig->Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_custom_msgs.xml");
R_ASSERT(!ActorMenu);
ActorMenu = new CUIActorMenu();
R_ASSERT(!PdaMenu);
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/UIGameDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void CUIGameDM::Init(int stage)
{ // unique
m_pTeamPanels->Init(TEAM_PANELS_DM_XML_NAME, "team_panels_wnd");
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_dm.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_game_dm.xml");
CUIXmlInit::InitWindow(uiXml, "global", 0, Window);
m_pMoneyIndicator->InitFromXML(uiXml);
m_pRankIndicator->InitFromXml(uiXml);
Expand Down Expand Up @@ -144,7 +144,7 @@ void CUIGameDM::SetVoteMessage(LPCSTR str)
if (!m_voteStatusWnd)
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_dm.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_game_dm.xml");
m_voteStatusWnd = new UIVoteStatusWnd();
m_voteStatusWnd->InitFromXML(uiXml);
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UIGameTDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void CUIGameTDM::Init(int stage)
m_pTeamPanels->Init(TEAM_PANELS_TDM_XML_NAME, "team_panels_wnd");

CUIXml uiXml, xml2;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_game_tdm.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_game_tdm.xml");

CUIXmlInit::InitWindow(uiXml, "global", 0, Window);
CUIXmlInit::InitStatic(uiXml, "team1_icon", 0, m_team1_icon);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UITeamPanels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ UITeamPanels::~UITeamPanels() { CUIStatsIcon::FreeTexInfo(); }

void UITeamPanels::Init(LPCSTR xmlName, LPCSTR panelsRootNode)
{
uiXml.Load(CONFIG_PATH, UI_PATH, xmlName);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xmlName);
CUIXmlInit::InitWindow(uiXml, panelsRootNode, 0, this);
XML_NODE panelsRoot = uiXml.NavigateToNode(panelsRootNode, 0);
VERIFY(panelsRoot);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/UIZoneMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CUIZoneMap::~CUIZoneMap() {}
void CUIZoneMap::Init()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "zone_map.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "zone_map.xml");

CUIXmlInit xml_init;
xml_init.InitStatic(uiXml, "minimap:background", 0, &m_background);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void CWeapon::Load(LPCSTR section)
if (!pWpnScopeXml)
{
pWpnScopeXml = new CUIXml();
pWpnScopeXml->Load(CONFIG_PATH, UI_PATH, "scopes.xml");
pWpnScopeXml->Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "scopes.xml");
}
CUIXmlInit::InitWindow(*pWpnScopeXml, scope_tex_name.c_str(), 0, m_UIScope);
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/WeaponMagazined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void createWpnScopeXML()
if (!pWpnScopeXml)
{
pWpnScopeXml = new CUIXml();
pWpnScopeXml->Load(CONFIG_PATH, UI_PATH, "scopes.xml");
pWpnScopeXml->Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "scopes.xml");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/map_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void CMapLocation::LoadSpot(LPCSTR type, bool bReload)
if (!g_uiSpotXml)
{
g_uiSpotXml = new CUIXml();
g_uiSpotXml->Load(CONFIG_PATH, UI_PATH, "map_spots.xml");
g_uiSpotXml->Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "map_spots.xml");
}

string512 path_base, path;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIActorMenuInitialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CUIActorMenu::~CUIActorMenu()
void CUIActorMenu::Construct()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "actor_menu.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "actor_menu.xml");

CUIXmlInit xml_init;

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIBtnHint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CUIButtonHint::CUIButtonHint() : m_ownerWnd(NULL), m_enabledOnFrame(false)

CUIXmlInit xml_init;
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "hint_item.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "hint_item.xml");
xml_init.InitFrameWindow(uiXml, "button_hint", 0, this);

m_text = new CUITextWnd();
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UICellItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CUICellItem::~CUICellItem()
void CUICellItem::init()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "actor_menu_item.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "actor_menu_item.xml");

m_text = new CUIStatic();
m_text->SetAutoDelete(true);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UICharacterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void CUICharacterInfo::Init_IconInfoItem(CUIXml& xml_doc, LPCSTR item_str, UIIte
void CUICharacterInfo::InitCharacterInfo(Fvector2 pos, Fvector2 size, LPCSTR xml_name)
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, xml_name);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_name);
InitCharacterInfo(pos, size, &uiXml);
}

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIDemoPlayControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ CUIDemoPlayControl::~CUIDemoPlayControl()
void CUIDemoPlayControl::Init()
{
CUIXml xml_doc;
xml_doc.Load(CONFIG_PATH, UI_PATH, "demo_play_control.xml");
xml_doc.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "demo_play_control.xml");

CUIXmlInit::InitWindow(xml_doc, "demo_play_control", 0, this);

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIFactionWarWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void CUIFactionWarWnd::Reset()
void CUIFactionWarWnd::Init()
{
CUIXml xml;
xml.Load( CONFIG_PATH, UI_PATH, PDA_FACTION_WAR_XML );
xml.Load( CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, PDA_FACTION_WAR_XML );

CUIXmlInit::InitWindow( xml, "main_wnd", 0, this );

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIFixedScrollBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void CUIFixedScrollBar::InitScrollBar(Fvector2 pos, bool horizontal, LPCSTR prof
{
string256 _path;
CUIXml xml_doc;
xml_doc.Load(CONFIG_PATH, UI_PATH, "scroll_bar.xml");
xml_doc.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "scroll_bar.xml");

float width = xml_doc.ReadAttribFlt(profile, 0, "width", 17.0f);
float height = xml_doc.ReadAttribFlt(profile, 0, "height", 17.0f);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIGameTutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void CUISequencer::Start(LPCSTR tutor_name)
m_UIWindow = new CUIWindow();

CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "game_tutorials.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "game_tutorials.xml");

int items_count = uiXml.GetNodesNum(tutor_name, 0, "item");
VERIFY(items_count > 0);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIInvUpgradeInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ UIInvUpgradeInfo::~UIInvUpgradeInfo() {}
void UIInvUpgradeInfo::init_from_xml(LPCSTR xml_name)
{
CUIXml ui_xml;
ui_xml.Load(CONFIG_PATH, UI_PATH, xml_name);
ui_xml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_name);
CUIXmlInit xml_init;

XML_NODE stored_root = ui_xml.GetLocalRoot();
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIInvUpgradeProperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ UIInvUpgPropertiesWnd::~UIInvUpgPropertiesWnd() { delete_data(m_properties_ui);
void UIInvUpgPropertiesWnd::init_from_xml(LPCSTR xml_name)
{
CUIXml ui_xml;
ui_xml.Load(CONFIG_PATH, UI_PATH, xml_name);
ui_xml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_name);

XML_NODE stored_root = ui_xml.GetLocalRoot();
XML_NODE node = ui_xml.NavigateToNode("upgrade_info", 0);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIInventoryUpgradeWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ CUIInventoryUpgradeWnd::~CUIInventoryUpgradeWnd()
void CUIInventoryUpgradeWnd::Init()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, g_inventory_upgrade_xml);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, g_inventory_upgrade_xml);

CUIXmlInit xml_init;
xml_init.InitWindow(uiXml, "main", 0, this);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIItemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ CUIItemInfo::~CUIItemInfo()
void CUIItemInfo::InitItemInfo(LPCSTR xml_name)
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, xml_name);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_name);
CUIXmlInit xml_init;

if (uiXml.NavigateToNode("main_frame", 0))
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIKeyBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void CUIKeyBinding::FillUpList(CUIXml& xml_doc_ui, LPCSTR path_ui)
string256 buf;
CUIXml xml_doc;
CStringTable st;
xml_doc.Load(CONFIG_PATH, UI_PATH, "ui_keybinding.xml");
xml_doc.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_keybinding.xml");

int groupsCount = xml_doc.GetNodesNum("", 0, "group");

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UILoadingScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ UILoadingScreen::UILoadingScreen()
void UILoadingScreen::Initialize()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, "ui_mm_loading_screen.xml");
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_mm_loading_screen.xml");

loadingProgressBackground = UIHelper::CreateStatic(uiXml, "loading_progress_background", this);
loadingProgress = UIHelper::CreateProgressBar(uiXml, "loading_progress", this);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UILogsWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void CUILogsWnd::SendMessage(CUIWindow* pWnd, s16 msg, void* pData)

void CUILogsWnd::Init()
{
m_uiXml.Load(CONFIG_PATH, UI_PATH, PDA_LOGS_XML);
m_uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, PDA_LOGS_XML);

CUIXmlInit::InitWindow(m_uiXml, "main_wnd", 0, this);

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMMShniaga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void CUIMMShniaga::SetPage(enum_page_id page_id, LPCSTR xml_file, LPCSTR xml_pat
delete_data(*lst);

CUIXml tmp_xml;
tmp_xml.Load(CONFIG_PATH, UI_PATH, xml_file);
tmp_xml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_file);
CreateList(*lst, tmp_xml, xml_path);
}

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMPAdminMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void CUIMpAdminMenu::Init()
if (!xml_doc)
xml_doc = new CUIXml();

xml_doc->Load(CONFIG_PATH, UI_PATH, "ui_mp_admin_menu.xml");
xml_doc->Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_mp_admin_menu.xml");

CUIXmlInit::InitWindow(*xml_doc, "admin_menu", 0, this);
CUIXmlInit::InitStatic(*xml_doc, "admin_menu:background", 0, m_pBack);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMainIngameWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ CUIMainIngameWnd::~CUIMainIngameWnd()
void CUIMainIngameWnd::Init()
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, MAININGAME_XML);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, MAININGAME_XML);

CUIXmlInit xml_init;
xml_init.InitWindow(uiXml, "main", 0, this);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMapDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ CUIMapDesc::~CUIMapDesc()
void CUIMapDesc::Init()
{
CUIXml xml_doc;
xml_doc.Load(CONFIG_PATH, UI_PATH, "map_desc.xml");
xml_doc.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "map_desc.xml");

CUIXmlInit::InitWindow(xml_doc, "map_desc", 0, this);
CUIXmlInit::InitStatic(xml_doc, "map_desc:caption", 0, m_pCaption);
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMapInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void CUIMapInfo::InitMap(LPCSTR map_name, LPCSTR map_ver)
CStringTable str_tbl;

CUIXml xml_doc;
xml_doc.Load(CONFIG_PATH, UI_PATH, "ui_mapinfo.xml");
xml_doc.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "ui_mapinfo.xml");

CUITextWnd* st;
// try to find file with info
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMapWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ CUIMapWnd::~CUIMapWnd()
void CUIMapWnd::Init(LPCSTR xml_name, LPCSTR start_from)
{
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, xml_name);
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, xml_name);

string512 pth;
CUIXmlInit xml_init;
Expand Down
Loading

0 comments on commit b39957d

Please sign in to comment.