mirror of
https://github.com/LDDestroier/CC/
synced 2025-07-05 11:32:55 +00:00
Update demo.lua
This commit is contained in:
parent
55434d5247
commit
1fec1b20c6
@ -41,6 +41,11 @@ local pBlit = function(t, y, str)
|
|||||||
t.blit((" "):rep(#str), str, str)
|
t.blit((" "):rep(#str), str, str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local pWrite = function(t, x, y, str)
|
||||||
|
t.setCursorPos(x, y)
|
||||||
|
t.write(str)
|
||||||
|
end
|
||||||
|
|
||||||
windont = dofile("windont.lua")
|
windont = dofile("windont.lua")
|
||||||
|
|
||||||
windont.doClearScreen = true
|
windont.doClearScreen = true
|
||||||
@ -50,21 +55,15 @@ INSTRUCTIONS = windont.newWindow(2, scr_y - 5, scr_x - 4, 3, {backColor = "-"})
|
|||||||
ONE = windont.newWindow(1, 1, 9, 5, {backColor = "e"})
|
ONE = windont.newWindow(1, 1, 9, 5, {backColor = "e"})
|
||||||
TWO = windont.newWindow(1, 1, 19, 10, {backColor = "-", textColor = "-"})
|
TWO = windont.newWindow(1, 1, 19, 10, {backColor = "-", textColor = "-"})
|
||||||
|
|
||||||
INSTRUCTIONS.setCursorPos(1, 1)
|
pWrite(INSTRUCTIONS, 1, 1, "Arrow keys to move windon't ONE (red)")
|
||||||
INSTRUCTIONS.write("Arrow keys to move windon't ONE (red)")
|
pWrite(INSTRUCTIONS, 1, 2, "WASD keys to move windon't TWO (blue)")
|
||||||
INSTRUCTIONS.setCursorPos(1, 2)
|
pWrite(INSTRUCTIONS, 1, 3, "Press 'Q' to quit")
|
||||||
INSTRUCTIONS.write("WASD keys to move windon't TWO (blue)")
|
|
||||||
INSTRUCTIONS.setCursorPos(1, 3)
|
|
||||||
INSTRUCTIONS.write("Press 'Q' to quit")
|
|
||||||
|
|
||||||
ONE.setTextColor(0)
|
ONE.setTextColor(0)
|
||||||
ONE.setBackgroundColor(colors.gray)
|
ONE.setBackgroundColor(colors.gray)
|
||||||
ONE.setCursorPos(2, 2)
|
pWrite(INSTRUCTIONS, 2, 2, " I'm ")
|
||||||
ONE.write(" I'm ")
|
pWrite(INSTRUCTIONS, 2, 3, "Stencil")
|
||||||
ONE.setCursorPos(2, 3)
|
pWrite(INSTRUCTIONS, 2, 4, " Man ")
|
||||||
ONE.write("Stencil")
|
|
||||||
ONE.setCursorPos(2, 4)
|
|
||||||
ONE.write(" Man ")
|
|
||||||
|
|
||||||
TWO.setTextColor(colors.gray)
|
TWO.setTextColor(colors.gray)
|
||||||
TWO.setBackgroundColor(colors.green)
|
TWO.setBackgroundColor(colors.green)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user