diff options
author | ubq323 <ubq323@ubq323.website> | 2023-01-31 23:51:25 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-01-31 23:51:25 +0000 |
commit | 04664ee48de5fc8b06a584e20a4b75c41dafa558 (patch) | |
tree | 49192241d64897fb34f75a92dbab1e11d706fa22 /client/util.lua | |
parent | 82c4e04fa6b27a1e9cb5469d7847aef80e5a22bd (diff) |
add sending of tile changes, between players. server remembers all changes made. also add better debug screen
Diffstat (limited to 'client/util.lua')
-rw-r--r-- | client/util.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/util.lua b/client/util.lua new file mode 100644 index 0000000..1d9b753 --- /dev/null +++ b/client/util.lua @@ -0,0 +1,18 @@ +local font = love.graphics.getFont() +local text = love.graphics.newText(font) + +local function print_good(lines,x,y) + for _,line in ipairs(lines) do + text:set(line) + local w,h = text:getDimensions() + love.graphics.setColor(0,0,0,0.6) + love.graphics.rectangle("fill",x,y,w,h) + love.graphics.setColor(1,1,1) + love.graphics.draw(text,x,y) + y = y + h + end +end + +return { + print_good=print_good +} |