diff --git a/src/client/game/ui_scripting/element.cpp b/src/client/game/ui_scripting/element.cpp index fd1d6204..0890f6ad 100644 --- a/src/client/game/ui_scripting/element.cpp +++ b/src/client/game/ui_scripting/element.cpp @@ -34,6 +34,7 @@ namespace ui_scripting {"fira_mono_bold", "fonts/fira_mono_bold.ttf"}, {"fira_mono_regular", "fonts/fira_mono_regular.ttf"}, {"defaultbold", "fonts/defaultbold.otf"}, + {"objective", "fonts/defaultbold.otf"}, {"default", "fonts/default.otf"}, }; diff --git a/src/client/game/ui_scripting/lua/context.cpp b/src/client/game/ui_scripting/lua/context.cpp index 98d9b54d..0550ec42 100644 --- a/src/client/game/ui_scripting/lua/context.cpp +++ b/src/client/game/ui_scripting/lua/context.cpp @@ -540,6 +540,17 @@ namespace ui_scripting::lua } ); + menu_type["ignoreevents"] = sol::property( + [](menu& menu) + { + return menu.ignoreevents; + }, + [](menu& menu, bool ignoreevents) + { + menu.ignoreevents = ignoreevents; + } + ); + menu_type["isopen"] = [](menu& menu) { return menu.visible || (menu.type == menu_type::overlay && game::Menu_IsMenuOpenAndVisible(0, menu.overlay_menu.data())); @@ -882,6 +893,12 @@ namespace ui_scripting::lua return screen; }; + game_type["playmenuvideo"] = [](const game&, const std::string& video) + { + reinterpret_cast + (::game::base_address + 0x71B970)(video.data(), 64, 0); + }; + struct player { }; diff --git a/src/client/game/ui_scripting/lua/engine.cpp b/src/client/game/ui_scripting/lua/engine.cpp index 28e7faed..d5ac70d3 100644 --- a/src/client/game/ui_scripting/lua/engine.cpp +++ b/src/client/game/ui_scripting/lua/engine.cpp @@ -52,7 +52,7 @@ namespace ui_scripting::lua::engine for (const auto& menu : menus) { - if (!is_menu_visible(menu.second)) + if (!is_menu_visible(menu.second) || menu.second.ignoreevents) { continue; } diff --git a/src/client/game/ui_scripting/menu.hpp b/src/client/game/ui_scripting/menu.hpp index a95b070b..cd975c46 100644 --- a/src/client/game/ui_scripting/menu.hpp +++ b/src/client/game/ui_scripting/menu.hpp @@ -18,6 +18,7 @@ namespace ui_scripting bool visible = false; bool hidden = false; bool cursor = false; + bool ignoreevents = false; bool cursor_was_enabled = false; void open();