1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Better UX when touch events aren't supported by Irrlicht device (#15288)

This commit is contained in:
grorp 2024-10-16 21:37:00 +02:00 committed by GitHub
parent 24704b01d9
commit 9f43018df2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 50 additions and 4 deletions

View file

@ -1028,6 +1028,14 @@ int ModApiMainMenu::l_get_active_irrlicht_device(lua_State *L)
return 1;
}
/******************************************************************************/
int ModApiMainMenu::l_irrlicht_device_supports_touch(lua_State *L)
{
lua_pushboolean(L, RenderingEngine::get_raw_device()->supportsTouchEvents());
return 1;
}
/******************************************************************************/
int ModApiMainMenu::l_get_min_supp_proto(lua_State *L)
{
@ -1160,6 +1168,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top)
API_FCT(get_active_driver);
API_FCT(get_active_renderer);
API_FCT(get_active_irrlicht_device);
API_FCT(irrlicht_device_supports_touch);
API_FCT(get_min_supp_proto);
API_FCT(get_max_supp_proto);
API_FCT(get_formspec_version);