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:
parent
24704b01d9
commit
9f43018df2
10 changed files with 50 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue