From 7b6c649eaccbb2cf06a41c1f22815664204dfcbb Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 28 Jul 2022 08:23:49 +0200 Subject: [PATCH] fixed a bug where moving a layer to trash would swap it and remove the swapped one instead if the maximum ui height was exceeded with layers --- data/saves.sav | 2 +- manglr2.pde | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/data/saves.sav b/data/saves.sav index d492b21..ecc2523 100755 --- a/data/saves.sav +++ b/data/saves.sav @@ -1,2 +1,2 @@ //globals -uptime = 116880661 +uptime = 116912351 diff --git a/manglr2.pde b/manglr2.pde index b44cde2..de26263 100644 --- a/manglr2.pde +++ b/manglr2.pde @@ -119,3 +119,21 @@ void snapshot() { println("Rendered " + frameName + ".png at " + dataPath("")+"/snapshots/ with a resolution of " + renderer.width + " x " + renderer.height); saveStrings(dataPath("saves.sav"), saveData); } + +void mousePressed() +{ + if (mouseButton == LEFT) { + if (sourceManager.dir != null) { + sourceManager.importURI(sourceManager.dir + "/" + sourceManager.selection[(int)random(sourceManager.selection.length)]); + } + } + if (mouseButton == RIGHT) { + snapshot(); + } +} +void mouseWheel(MouseEvent event) { + + if (event.getCount() < 0) renderSize += 8; + else renderSize -= 8; + renderSize = constrain(renderSize, 8, 15000); +}