mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Better UX when touch events aren't supported by Irrlicht device (#15288)
This commit is contained in:
@@ -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);
|
||||
|
@@ -116,6 +116,8 @@ private:
|
||||
|
||||
static int l_get_active_irrlicht_device(lua_State *L);
|
||||
|
||||
static int l_irrlicht_device_supports_touch(lua_State *L);
|
||||
|
||||
//filesystem
|
||||
|
||||
static int l_get_mainmenu_path(lua_State *L);
|
||||
|
Reference in New Issue
Block a user