249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
if def.kind == 'hbar'
then wfac = wfac * clamp
else hfac = hfac * clamp
end
local x,y, w,h = state.x, state.y, def.w, def.h
widget('box[%s,%s;%s,%s;%s]',
x,y, w,h, cl:brighten(0.2):hex())
widget('box[%s,%s;%s,%s;%s]',
x, y + (h*(1-hfac)), w * wfac, h * hfac, cl:hex())
if def.text then
widget('hypertext[%s,%s;%s,%s;;%s]',
state.x, state.y, def.w, def.h,
string.format('<global halign=center valign=middle color=%s>%s', fg:hex(), E(def.text)))
end
end
|
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
if def.kind == 'hbar'
then wfac = wfac * clamp
else hfac = hfac * clamp
end
local x,y, w,h = state.x, state.y, def.w, def.h
widget('box[%s,%s;%s,%s;%s]',
x,y, w,h, cl:brighten(0.2):hex())
if clamp > 0 then
widget('box[%s,%s;%s,%s;%s]',
x, y + (h*(1-hfac)), w * wfac, h * hfac, cl:hex())
end
if def.text then
widget('hypertext[%s,%s;%s,%s;;%s]',
state.x, state.y, def.w, def.h,
string.format('<global halign=center valign=middle color=%s>%s', fg:hex(), E(def.text)))
end
end
|