From 66a7f8e03398ae6c1077c80878d459fc76fd34cf Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Sun, 6 Nov 2022 01:01:31 -0400 Subject: [PATCH] testing --- .gitmodules | 3 +++ gui/init.lua | 12 +++++------- multi | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 .gitmodules create mode 160000 multi diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5de64e1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "multi"] + path = multi + url = https://github.com/rayaman/multi diff --git a/gui/init.lua b/gui/init.lua index 03825c9..a77c0fc 100644 --- a/gui/init.lua +++ b/gui/init.lua @@ -10,7 +10,7 @@ local cursor_hand = love.mouse.getSystemCursor("hand") local clips = {} local max, min, abs, rad, floor, ceil = math.max, math.min, math.abs, math.rad, math.floor,math.ceil local frame, image, text, box, video = 0, 1, 2, 4, 8 - +local has_moonshine, moonshine = pcall(require,"moonshine") local global_drag gui.__index = gui @@ -728,8 +728,10 @@ local draw_handler = function(child) drawtypes[band(type,video)](child,x,y,w,h) drawtypes[band(type,image)](child,x,y,w,h) drawtypes[band(type,text)](child,x,y,w,h) - - love.graphics.setScissor() -- Remove the scissor + + if child.__variables.clip[1] then + love.graphics.setScissor() -- Remove the scissor + end end drawer:newLoop(function() local children = gui:getAllChildren() @@ -739,10 +741,6 @@ drawer:newLoop(function() child.effect(function() draw_handler(child) end) - elseif child.chain then - child.chain.draw(function() - draw_handler(child) - end) else draw_handler(child) end diff --git a/multi b/multi new file mode 160000 index 0000000..a5b59ee --- /dev/null +++ b/multi @@ -0,0 +1 @@ +Subproject commit a5b59ee601cdf73200f17ae32e64c37ff8b75509