#include #include "loader/component_loader.hpp" #include "game/game.hpp" #include "command.hpp" #include "console.hpp" #include namespace lui { class component final : public component_interface { public: void post_unpack() override { command::add("lui_open", [](const command::params& params) { if (params.size() <= 1) { console::info("usage: lui_open \n"); return; } game::LUI_OpenMenu(0, params[1], 0, 0, 0); }); command::add("lui_open_popup", [](const command::params& params) { if (params.size() <= 1) { console::info("usage: lui_open_popup \n"); return; } game::LUI_OpenMenu(0, params[1], 1, 0, 0); }); command::add("runMenuScript", [](const command::params& params) { const auto args_str = params.join(1); const auto* args = args_str.data(); game::UI_RunMenuScript(0, &args); }); } }; } REGISTER_COMPONENT(lui::component)