summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-05 23:36:41 +0100
committerubq323 <ubq323@ubq323.website>2022-08-05 23:36:41 +0100
commit34b82abdabbe92aab5a1bcfb450e2f52c983c756 (patch)
treeecc88de68061319444cb3719bfb634c54d2752fc /img
parent86570733447b90a48c93df023b7f7cc776217a20 (diff)
vlorb
Diffstat (limited to 'img')
-rw-r--r--img/better_disp.lua18
1 files changed, 17 insertions, 1 deletions
diff --git a/img/better_disp.lua b/img/better_disp.lua
index 33c4104..dbf52e9 100644
--- a/img/better_disp.lua
+++ b/img/better_disp.lua
@@ -20,4 +20,20 @@ local function vlorb(onc,offc, g1,g2,g3,g4,g5,g6)
return textc,bgc,string.char(vlorbchar)
end
-return {vlorb=vlorb}
+local function test()
+ term.clear()
+ local gs = {false,false,false,false,false,false}
+ while true do
+ term.setCursorPos(1,1)
+ local tc,bgc,char = vlorb(colors.red,colors.black, table.unpack(gs))
+ term.setTextColor(tc)
+ term.setBackgroundColor(bgc)
+ term.write(char)
+ local _,key = os.pullEvent"key"
+ if 65<=key and key<=70 then
+ local idx = key-64
+ gs[idx] = not gs[idx]
+ end
+ end
+
+return {vlorb=vlorb,test=test}