mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-22 15:39:52 +00:00
lua: add Layer.isTransparent/isBackground
This commit is contained in:
parent
eb1ebfe728
commit
240a83b7a0
@ -71,6 +71,20 @@ int Layer_get_isGroup(lua_State* L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Layer_get_isTransparent(lua_State* L)
|
||||||
|
{
|
||||||
|
auto layer = get_ptr<Layer>(L, 1);
|
||||||
|
lua_pushboolean(L, layer->isTransparent());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Layer_get_isBackground(lua_State* L)
|
||||||
|
{
|
||||||
|
auto layer = get_ptr<Layer>(L, 1);
|
||||||
|
lua_pushboolean(L, layer->isBackground());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int Layer_set_name(lua_State* L)
|
int Layer_set_name(lua_State* L)
|
||||||
{
|
{
|
||||||
auto layer = get_ptr<Layer>(L, 1);
|
auto layer = get_ptr<Layer>(L, 1);
|
||||||
@ -106,6 +120,8 @@ const Property Layer_properties[] = {
|
|||||||
{ "opacity", Layer_get_opacity, Layer_set_opacity },
|
{ "opacity", Layer_get_opacity, Layer_set_opacity },
|
||||||
{ "isImage", Layer_get_isImage, nullptr },
|
{ "isImage", Layer_get_isImage, nullptr },
|
||||||
{ "isGroup", Layer_get_isGroup, nullptr },
|
{ "isGroup", Layer_get_isGroup, nullptr },
|
||||||
|
{ "isTransparent", Layer_get_isTransparent, nullptr },
|
||||||
|
{ "isBackground", Layer_get_isBackground, nullptr },
|
||||||
{ "color", UserData_get_color<Layer>, UserData_set_color<Layer> },
|
{ "color", UserData_get_color<Layer>, UserData_set_color<Layer> },
|
||||||
{ "data", UserData_get_text<Layer>, UserData_set_text<Layer> },
|
{ "data", UserData_get_text<Layer>, UserData_set_text<Layer> },
|
||||||
{ nullptr, nullptr, nullptr }
|
{ nullptr, nullptr, nullptr }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user