1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-12-04 23:39:58 +00:00

Update windont-demo.lua

This commit is contained in:
LDDestroier 2019-12-11 02:37:30 -05:00 committed by GitHub
parent 8807f4ac0a
commit dafb80a803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,22 @@ term.clear()
local x1, y1 = 2, 5
local x2, y2 = 13, 2
-- demo transformation function
-- mess with these all you like
-- just remember that they apply in reverse (x and y are positions on the screen from 1 to the window's width/height)
local TF = {
-- returns new X, new Y, and new character / text color / background color
char = function(x, y, meta)
return x, y, nil
end,
text = function(x, y, meta)
return x, y, nil
end,
back = function(x, y, meta)
return x, y, nil
end
}
local keysDown = {}
local tickTimer = os.startTimer(0.05)
@ -52,6 +68,10 @@ pBlit(TWO, 8, "ddddddddddddddddddd")
pBlit(TWO, 9, "ddddddddddddddddddd")
pBlit(TWO, 10, "ddddddddddddddddddd")
ONE.meta.charTransformation = TF.char
ONE.meta.textTransformation = TF.text
ONE.meta.backTransformation = TF.back
while true do
evt = {os.pullEvent()}