mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-02 21:19:10 +00:00
[lua] Add Tile.index getter
This commit is contained in:
parent
a6c1b2bc88
commit
9c728d2cac
@ -33,6 +33,13 @@ struct Tile {
|
||||
}
|
||||
};
|
||||
|
||||
int Tile_get_index(lua_State* L)
|
||||
{
|
||||
auto tile = get_obj<Tile>(L, 1);
|
||||
lua_pushinteger(L, tile->ti);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Tile_get_image(lua_State* L)
|
||||
{
|
||||
auto tile = get_obj<Tile>(L, 1);
|
||||
@ -165,6 +172,7 @@ const luaL_Reg Tile_methods[] = {
|
||||
};
|
||||
|
||||
const Property Tile_properties[] = {
|
||||
{ "index", Tile_get_index, nullptr },
|
||||
{ "image", Tile_get_image, nullptr }, // TODO Tile_set_image
|
||||
{ "data", Tile_get_data, Tile_set_data },
|
||||
{ "color", Tile_get_color, Tile_set_color },
|
||||
|
Loading…
Reference in New Issue
Block a user