diff options
-rw-r--r-- | shop2.lua | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -30,6 +30,11 @@ local function pad(s,n) local p = string.rep(" ",math.max(0,n-l)) return p..s end +local function centre(s,w) + s=tostring(s) + local l = #s + local p = math.floor(math.max(0,w-l)/2)) + return string.rep(" ",p)..s local function disp_shopscreen() local m = peripheral.wrap"left" @@ -59,6 +64,12 @@ local function disp_shopscreen() fmt_row(m,ix+2,i[5],i[2],i[1],i[4]) end + local w,h = m.getSize() + + printseq(m) { + {1,h-1}, colors.blue, centre("/pay <adr>@ac.kst <amount>",w) + } + end |