mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-23 09:41:04 +00:00
lua: add app.isUIAvailable
This commit is contained in:
parent
d91fe69c15
commit
ef23e1b307
@ -148,6 +148,13 @@ int App_get_site(lua_State* L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int App_get_isUIAvailable(lua_State* L)
|
||||||
|
{
|
||||||
|
app::Context* ctx = App::instance()->context();
|
||||||
|
lua_pushboolean(L, ctx && ctx->isUIAvailable());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int App_get_version(lua_State* L)
|
int App_get_version(lua_State* L)
|
||||||
{
|
{
|
||||||
lua_pushstring(L, VERSION);
|
lua_pushstring(L, VERSION);
|
||||||
@ -170,6 +177,7 @@ const Property App_properties[] = {
|
|||||||
{ "bgColor", App_get_bgColor, App_set_bgColor },
|
{ "bgColor", App_get_bgColor, App_set_bgColor },
|
||||||
{ "version", App_get_version, nullptr },
|
{ "version", App_get_version, nullptr },
|
||||||
{ "site", App_get_site, nullptr },
|
{ "site", App_get_site, nullptr },
|
||||||
|
{ "isUIAvailable", App_get_isUIAvailable, nullptr },
|
||||||
{ nullptr, nullptr, nullptr }
|
{ nullptr, nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user