mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-17 13:20:45 +00:00
[lua] Add get/set 'tilemapMode' Site object
This commit is contained in:
parent
95513af267
commit
68730c1c1b
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2024 Igara Studio S.A.
|
||||
// Copyright (C) 2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -83,6 +83,26 @@ int Site_get_image(lua_State* L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Site_get_tilemapMode(lua_State* L)
|
||||
{
|
||||
auto site = get_obj<Site>(L, 1);
|
||||
if (site)
|
||||
lua_pushinteger(L, (int)site->tilemapMode());
|
||||
else
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Site_get_tilesetMode(lua_State* L)
|
||||
{
|
||||
auto site = get_obj<Site>(L, 1);
|
||||
if (site)
|
||||
lua_pushinteger(L, (int)site->tilesetMode());
|
||||
else
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const luaL_Reg Site_methods[] = {
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
@ -94,6 +114,8 @@ const Property Site_properties[] = {
|
||||
{ "frame", Site_get_frame, nullptr },
|
||||
{ "frameNumber", Site_get_frameNumber, nullptr },
|
||||
{ "image", Site_get_image, nullptr },
|
||||
{ "tilemapMode", Site_get_tilemapMode, nullptr },
|
||||
{ "tilesetMode", Site_get_tilesetMode, nullptr },
|
||||
{ nullptr, nullptr, nullptr }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user