diff --git a/src/Components/Modules/Menus.cpp b/src/Components/Modules/Menus.cpp index 662e7d86..51fe5ce0 100644 --- a/src/Components/Modules/Menus.cpp +++ b/src/Components/Modules/Menus.cpp @@ -266,7 +266,7 @@ namespace Components } // Load custom menus - if (std::string(menuList->name) == "ui_mp/menus.txt") + if (std::string(menuList->name) == "ui_mp/code.txt") // Should be menus, but code is loaded ingame { for (auto menu : Menus::CustomMenus) { @@ -478,7 +478,7 @@ namespace Components void Menus::AddMenuListHook(Game::UiContext *dc, Game::MenuList *menuList, int close) { - Game::MenuList* menus = Game::DB_FindXAssetHeader(Game::XAssetType::ASSET_TYPE_MENUFILE, "ui_mp/menus.txt").menuList; + Game::MenuList* menus = Game::UI_LoadMenus("ui_mp/menus.txt", 3); Game::UI_AddMenuList(dc, menus, close); Game::UI_AddMenuList(dc, menuList, close); diff --git a/src/Game/Functions.cpp b/src/Game/Functions.cpp index 1c67a121..3416574d 100644 --- a/src/Game/Functions.cpp +++ b/src/Game/Functions.cpp @@ -105,6 +105,7 @@ namespace Game Sys_IsMainThread_t Sys_IsMainThread = (Sys_IsMainThread_t)0x4C37D0; UI_AddMenuList_t UI_AddMenuList = (UI_AddMenuList_t)0x4533C0; + UI_LoadMenus_t UI_LoadMenus = (UI_LoadMenus_t)0x641460; UI_DrawHandlePic_t UI_DrawHandlePic = (UI_DrawHandlePic_t)0x4D0EA0; Win_GetLanguage_t Win_GetLanguage = (Win_GetLanguage_t)0x45CBA0; diff --git a/src/Game/Functions.hpp b/src/Game/Functions.hpp index 2d73e303..08e3a2b3 100644 --- a/src/Game/Functions.hpp +++ b/src/Game/Functions.hpp @@ -232,6 +232,9 @@ namespace Game typedef void(__cdecl * UI_AddMenuList_t)(UiContext *dc, MenuList *menuList, int close); extern UI_AddMenuList_t UI_AddMenuList; + typedef MenuList *(__cdecl * UI_LoadMenus_t)(const char *menuFile, int imageTrack); + extern UI_LoadMenus_t UI_LoadMenus; + typedef void(__cdecl * UI_DrawHandlePic_t)(/*ScreenPlacement*/void *scrPlace, float x, float y, float w, float h, int horzAlign, int vertAlign, const float *color, Material *material); extern UI_DrawHandlePic_t UI_DrawHandlePic;