mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-09 06:40:50 +00:00
39 lines
1.0 KiB
Lua
39 lines
1.0 KiB
Lua
-- Copyright (C) 2019 Igara Studio S.A.
|
|
--
|
|
-- This file is released under the terms of the MIT license.
|
|
-- Read LICENSE.txt for more information.
|
|
|
|
-- Global preferences
|
|
do
|
|
assert(app.preferences.general.language == "en")
|
|
assert(app.preferences.general.screen_scale == 2)
|
|
assert(app.preferences.general.ui_scale == 1)
|
|
end
|
|
|
|
-- Preferences for tools
|
|
do
|
|
local t = app.preferences.tool('pencil')
|
|
assert(t.opacity == 255)
|
|
assert(t.tolerance == 0)
|
|
assert(t.contiguous == true)
|
|
assert(t.brush.type == BrushType.CIRCLE)
|
|
assert(t.brush.size == 1)
|
|
t.brush.size = 2
|
|
assert(t.brush.size == 2)
|
|
|
|
-- Getting the tool again will give us the default configuration
|
|
-- again in batch mode
|
|
t = app.preferences.tool('pencil')
|
|
assert(t.brush.size == 1)
|
|
end
|
|
|
|
-- Preferences for documents
|
|
do
|
|
local s = Sprite(32, 32)
|
|
local p = app.preferences.document(s)
|
|
assert(p.grid.bounds == Rectangle(0, 0, 16, 16))
|
|
assert(p.grid.color == Color(0, 0, 255))
|
|
p.grid.color = Color(255, 0, 0)
|
|
assert(p.grid.color == Color(255, 0, 0))
|
|
end
|