mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
lua: Add Image.cel property
This commit is contained in:
parent
56b31c8308
commit
32e29b8ea7
@ -263,6 +263,13 @@ int Image_get_spec(lua_State* L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Image_get_cel(lua_State* L)
|
||||
{
|
||||
const auto obj = get_obj<ImageObj>(L, 1);
|
||||
push_docobj<Cel>(L, obj->celId);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const luaL_Reg Image_methods[] = {
|
||||
{ "clone", Image_clone },
|
||||
{ "clear", Image_clear },
|
||||
@ -281,6 +288,7 @@ const Property Image_properties[] = {
|
||||
{ "height", Image_get_height, nullptr },
|
||||
{ "colorMode", Image_get_colorMode, nullptr },
|
||||
{ "spec", Image_get_spec, nullptr },
|
||||
{ "cel", Image_get_cel, nullptr },
|
||||
{ nullptr, nullptr, nullptr }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user