From ca487ecba1820e7175bd02154a37da2abd9243cd Mon Sep 17 00:00:00 2001 From: Paul Liverman Date: Sat, 5 Dec 2015 23:24:14 -0800 Subject: [PATCH] fixed small bug, decided not to do alternate control thingy for now --- src/main.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.lua b/src/main.lua index c168ab2..a2e8f45 100644 --- a/src/main.lua +++ b/src/main.lua @@ -99,7 +99,7 @@ function love.draw() else if hovering == "Card" then --deck over card - lg.print("Left click to place deck (will place card underneath on the bottom of the deck). Right click to flip cards in the deck.", 2, lg.getHeight() - 14) + lg.print("Left click to place deck (will not interact with card underneath). Right click to flip cards in the deck.", 2, lg.getHeight() - 14) elseif hovering == "Deck" then --deck over deck lg.print("Left click to place deck (will not interact with deck underneath). Scroll up to add this deck on top, scroll down to add this deck on bottom. Right click to flip cards in this deck.", 2, lg.getHeight() - 14) @@ -121,6 +121,16 @@ function love.mousepressed(x, y, button) end end elseif holding:isInstanceOf(Deck) then + --[[ + local item = false + + for i=#items,1,-1 do + if isOnItem(x, y, items[i]) then + item = i + end + end + --]] + holding:moveTo(x, y) insert(items, holding) holding = false @@ -130,6 +140,7 @@ function love.mousepressed(x, y, button) for i=#items,1,-1 do if isOnItem(x, y, items[i]) then item = i + break end end