1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
local theme = {
fonts = {
default = 'galax___.ttf',
title = 'faceptbs.ttf'
},
fontsize = {
default = 16,
title = 16
},
colors = {
window_border = function(tk) return tk.rgb(0, 128, 128) end,
window_title_bg = function(tk) return tk.rgb(0, 0, 0) end,
window_title = function(tk) return tk.rgb(255, 0, 255) end,
default_bg = function(tk) return tk.rgb(0, 0, 0) end,
default = function(tk) return tk.rgb(255, 255, 255) end,
scrollbar = function(tk) return tk.rgb(0, 255, 255) end,
resizebox = function(tk) return tk.rgb(0, 0, 0) end,
resizebox_border = function(tk) return tk.rgb(0, 255, 255) end,
button = {
good = {
text = function(tk) return tk.rgb(0, 255, 0) end,
bg = function(tk) return tk.rgb(0, 0, 0) end
},
bad = {
text = function(tk) return tk.rgb(255, 0, 0) end,
bg = function(tk) return tk.rgb(0, 0, 0) end
},
action = {
text = function(tk) return tk.rgb(128, 128, 255) end,
bg = function(tk) return tk.rgb(0, 0, 0) end
}
}
},
draw_bg = function(x0, y0, buf)
local step = 32
local halfstep = 16
buf:fillrect(0, 0, buf:width(), buf:height(), buf:rgb(0, 0, 0))
for x = x0 - (x0 % step), x0 + buf:width(), step do
for y = y0 - (y0 % step), y0 + buf:height(), step do
buf:fillrect(x - x0, y - y0 + halfstep, step, 1, buf:rgb(0, 0, 255))
buf:fillrect(x - x0 + halfstep, y - y0, 1, step, buf:rgb(0, 0, 255))
end
end
end,
draw_image_bg = function(x0, y0, buf)
local step = 4
local halfstep = 2
for y = y0 - (y0 % step), y0 + buf:height(), step do
buf:fillrect(0, y - y0, buf:width(), halfstep, buf:rgb(64, 64, 64))
buf:fillrect(0, y - y0 + halfstep, buf:width(), halfstep, buf:rgb(80, 80, 80))
end
end
}
return theme
|