Differences From
Artifact [81aedb85b1]:
- File
mods/starlit/ui.lua
— part of check-in
[953151446f]
at
2024-05-05 19:31:39
on branch trunk
— better alarm LEDs, continue work on matter compiler UI, hack around gravitational horrorscape (i.e. stop shitting all over the server's `minetest.conf`), better stat interface, tweak some compute stats, be more generous with starting battery loadout, mercilessly squash numberless bugs beneath my jackbooted heel
(user:
lexi,
size: 9984)
[annotate]
[blame]
[check-ins using]
249 249 if def.kind == 'hbar'
250 250 then wfac = wfac * clamp
251 251 else hfac = hfac * clamp
252 252 end
253 253 local x,y, w,h = state.x, state.y, def.w, def.h
254 254 widget('box[%s,%s;%s,%s;%s]',
255 255 x,y, w,h, cl:brighten(0.2):hex())
256 - widget('box[%s,%s;%s,%s;%s]',
257 - x, y + (h*(1-hfac)), w * wfac, h * hfac, cl:hex())
256 + if clamp > 0 then
257 + widget('box[%s,%s;%s,%s;%s]',
258 + x, y + (h*(1-hfac)), w * wfac, h * hfac, cl:hex())
259 + end
258 260 if def.text then
259 261 widget('hypertext[%s,%s;%s,%s;;%s]',
260 262 state.x, state.y, def.w, def.h,
261 263 string.format('<global halign=center valign=middle color=%s>%s', fg:hex(), E(def.text)))
262 264 end
263 265 end
264 266