/thing.lua Secret
Created
November 17, 2018 20:33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set(x, y, char, fc, bc) | |
fgc = fc or 0xFFFFFF | |
bgc = bc or 0x000000 | |
gp.setBackground(bcg) | |
gp.setForeground(fcg) | |
if x <= screen_x and y <= screen_y then | |
gp.bind(screens.TL, false) | |
gp.set(x, y, char) | |
elseif x > screen_x and y <= screen_y then | |
gp.bind(screens.TR, false) | |
gp.set(x-screen_x, y, char) | |
elseif x<= screen_x and y > screen_y then | |
gp.bind(screens.BL, false) | |
gp.set(x, y-screen_y, char) | |
elseif x > screen_x and y > screen_y then | |
gp.bind(screens.BR, false) | |
gp.set(x-screen_x, y-screen_y, char) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment