diff options
| author | 1029chris <1029chris@gmail.com> | 2016-04-12 13:09:15 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-04-12 13:09:15 -0700 |
| commit | dedd2ed84d97b8ef312d723b76d9f7d3cee48353 (patch) | |
| tree | 13348a9fbd9d573ab2d94576a9f77065f9b378d0 | |
| parent | d0c2eb372e64bdacacffc7280033d11afc9b7444 (diff) | |
Moved code around window.lua
It'll run in a better order now
Also took off an if check that wasn't necessary
| -rw-r--r-- | window.lua | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -36,7 +36,7 @@ function drawWindow(id) if layer[1] ~= 0 and win[id].ex == false then if win[id].layer ~= 1 and win[layer[1]].hov == true then win[id].hover = false - elseif win[id].layer ~= 1 and win[id].layer ~= 2 and layer[1] ~= 0 and layer[2] ~= 0 and v1.yes == false and v1.timer <= 4 then + elseif win[id].layer ~= 1 and win[id].layer ~= 2 and layer[1] ~= 0 and layer[2] ~= 0 and v1.timer <= 4 then if win[layer[1]].hov == true or win[layer[2]].hov == true then win[id].hover = false else @@ -97,6 +97,12 @@ function drawWindow(id) win[id].y = sys.h-win[id].h-panel.thick-1 end end + if v1.yes == true and id ~= 2 and win[id].ex == false and v1.timer >= 4 then + win[id].ex = true + end + if v1.yes == true and id == 2 and v1.timer >= 4 then + layer.sendToFront = 2 + end if (sys.mouse.p.p == true and sys.mouse.p.x >= win[id].x+win[id].w-22 and sys.mouse.p.x <= (win[id].x+win[id].w-22)+16 and win[id].ex == false and sys.mouse.drag == false and sys.mouse.p.y >= win[id].y+5 and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) and v1.yes == false then win[id].ex = true @@ -116,12 +122,6 @@ function drawWindow(id) and sys.mouse.p.y <= (win[id].y+5)+16 and win[id].hover == true) and v1.yes == false then win[id].min = true end - if v1.yes == true and id ~= 2 and win[id].ex == false and v1.timer >= 4 then - win[id].ex = true - end - if v1.yes == true and id == 2 and v1.timer >= 4 then - layer.sendToFront = 2 - end if win[id].min == true and win[id].miny < minim then win[id].y = win[id].y + 150 win[id].miny = win[id].miny + 150 |
