add lui_close command

This commit is contained in:
Skull 2022-09-12 23:41:54 +03:00
parent faf8050c88
commit 3af7d507ff
2 changed files with 13 additions and 0 deletions

View File

@ -95,6 +95,17 @@ namespace lui
game::LUI_OpenMenu(0, params[1], 0, 0, 0);
});
command::add("lui_close", [](const command::params& params)
{
if (params.size() <= 1)
{
console::info("usage: lui_close <name>\n");
return;
}
game::LUI_LeaveMenuByName(0, params[1], 0, *game::hks::lua_state);
});
command::add("lui_open_popup", [](const command::params& params)
{
if (params.size() <= 1)

View File

@ -193,6 +193,8 @@ namespace game
WEAK symbol<void(int clientNum, const char* menu,
int a3, int a4, unsigned int a5)> LUI_OpenMenu{0x3F20A0, 0x1E1210};
WEAK symbol<void(int clientNum, const char* menu, int a3,
hks::lua_State* a4)> LUI_LeaveMenuByName{0xF6D00, 0x26BE80};
WEAK symbol<void()> LUI_EnterCriticalSection{0xF19A0, 0x2669B0};
WEAK symbol<void()> LUI_LeaveCriticalSection{0xF6C40, 0x26BDC0};