mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-30 12:19:04 +00:00
bd674dcb31
There is no UI yet to set Tileset user data (color and text).
37 lines
820 B
Lua
37 lines
820 B
Lua
-- Copyright (C) 2022 Igara Studio S.A.
|
|
--
|
|
-- This file is released under the terms of the MIT license.
|
|
-- Read LICENSE.txt for more information.
|
|
|
|
dofile('./test_utils.lua')
|
|
|
|
do
|
|
local spr = Sprite(4, 4, ColorMode.INDEXED)
|
|
|
|
app.command.NewLayer{ tilemap=true }
|
|
local tilemap = spr.layers[2]
|
|
|
|
local tileset = tilemap.tileset
|
|
assert(#tileset == 1);
|
|
|
|
app.useTool{
|
|
tool='pencil',
|
|
color=1,
|
|
layer=tilemap,
|
|
tilesetMode=TilesetMode.STACK,
|
|
points={ Point(0, 0) }}
|
|
assert(#tileset == 2)
|
|
|
|
assert(tileset.name == "")
|
|
tileset.name = "Default Land"
|
|
assert(tileset.name == "Default Land")
|
|
|
|
assert(tileset.data == "")
|
|
tileset.data = "land"
|
|
assert(tileset.data == "land")
|
|
|
|
assert(tileset.color == Color())
|
|
tileset.color = Color(255, 0, 0)
|
|
assert(tileset.color == Color(255, 0, 0))
|
|
end
|