diff options
Diffstat (limited to 'src/im.lua')
| -rw-r--r-- | src/im.lua | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -66,9 +66,11 @@ local function draw_img(img, x, y, quad) end local function draw_stencil(x, y, w, h) - lg.stencil(function() - lg.rectangle("fill", x, y, w, h) - end, "replace", 1) + lg.setStencilMode("draw", 0) + lg.rectangle("fill", 0, 0, lg.getDimensions()) -- WHY DOESN'T LG.CLEAR() WORK RAAAAAGH + lg.setStencilMode("draw", 1) + lg.rectangle("fill", x, y, w, h) + lg.setStencilMode("test", 1) end local function text_cmd(text, x, y, r, g, b) @@ -417,14 +419,14 @@ function im.end_step() end function im.draw() - lg.setStencilTest("greater", 0) + lg.setStencilMode("test", 1) for _, win in ipairs(wins) do for _, cmd in ipairs(win.cmds) do cmd.fn(unpack(cmd.args)) end win.cmds = {} end - lg.setStencilTest() + lg.setStencilMode() end function im.has_focus() |
