Add playmenuvideo function
This commit is contained in:
parent
baa6ef236e
commit
1c9069b5ce
@ -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"},
|
||||
};
|
||||
|
||||
|
@ -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<void (*)(const char* a1, int a2, int a3)>
|
||||
(::game::base_address + 0x71B970)(video.data(), 64, 0);
|
||||
};
|
||||
|
||||
struct player
|
||||
{
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user