mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
lua: add Layer.isImage/isGroup properties
This commit is contained in:
parent
fa34453a1b
commit
8ba664e306
@ -55,6 +55,20 @@ int Layer_get_userData(lua_State* L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Layer_get_isImage(lua_State* L)
|
||||
{
|
||||
auto layer = get_ptr<Layer>(L, 1);
|
||||
lua_pushboolean(L, layer->isImage());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Layer_get_isGroup(lua_State* L)
|
||||
{
|
||||
auto layer = get_ptr<Layer>(L, 1);
|
||||
lua_pushboolean(L, layer->isGroup());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Layer_set_name(lua_State* L)
|
||||
{
|
||||
auto layer = get_ptr<Layer>(L, 1);
|
||||
@ -88,6 +102,8 @@ const Property Layer_properties[] = {
|
||||
{ "name", Layer_get_name, Layer_set_name },
|
||||
{ "opacity", Layer_get_opacity, Layer_set_opacity },
|
||||
{ "userData", Layer_get_userData, nullptr },
|
||||
{ "isImage", Layer_get_isImage, nullptr },
|
||||
{ "isGroup", Layer_get_isGroup, nullptr },
|
||||
{ nullptr, nullptr, nullptr }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user