1 import("piece_theme.lua")
2 import("selection.lua")
4 theme
.options
= OptList
{
5 ColorOpt("square", "Square color", "#EBD6A0"),
6 IntOpt("alpha", "Alpha", 192, 0, 255, "slider"),
7 BoolOpt("useborder", "Use border", true, OptList
{
8 ColorOpt("border", "Border color", "#9C8755"),
9 IntOpt("bwidth", "Border width", 3, 1, 10)
13 theme
.background
= function(size
)
14 local i
= Image(size
,size
)
15 local square
= theme
.options
.square
.value
16 local useborder
= theme
.options
.useborder
.value
17 local border
= theme
.options
.useborder
.sub_options
.border
.value
18 local bwidth
= theme
.options
.useborder
.sub_options
.bwidth
.value
19 square
.a
= theme
.options
.alpha
.value
23 i
:draw_line(Point(0,0),Point(size
,0), border
, bwidth
);
24 i
:draw_line(Point(0,size
),Point(size
,size
), border
, bwidth
);
25 i
:draw_line(Point(0,0),Point(0,size
), border
, bwidth
);
26 i
:draw_line(Point(size
,0),Point(size
,size
), border
, bwidth
);
31 theme
.validmove
= fromColor("#bdaede")