diff --git a/secondapplet.pde b/secondapplet.pde index 0080333..46432a6 100644 --- a/secondapplet.pde +++ b/secondapplet.pde @@ -2,7 +2,7 @@ PImage bin; int maxSurfaceHeight = 500; - +int nativeResoX, nativeResoY; public class SecondApplet extends PApplet { ControlP5 cp5; @@ -45,6 +45,12 @@ public class SecondApplet extends PApplet { .setSize(15, 15) .plugTo(this, "CP5_pauseAllAction"); pauseAll.getCaptionLabel().getStyle().setMargin(-17, 0, 0, 20); + + Bang nativeReso = cp5.addBang("native reso") + .setPosition(220,height-35) + .setSize(15,15) + .plugTo(this, "CP5_nativeResoAction"); + //nativeReso.getCaptionLabel().getStyle().setMargin(-17,0,0,20); /* Toggle saveParams = cp5.addToggle("save parameters") @@ -60,6 +66,10 @@ public class SecondApplet extends PApplet { binS = 40; } + void CP5_nativeResoAction() { + renderSize = max(nativeResoX, nativeResoY); + //renderer.setSize(nativeResoX, nativeResoY); + } void CP5_recordAction() { recording = !recording; } @@ -92,6 +102,12 @@ public class SecondApplet extends PApplet { totalBrickHeight+= bricks.get(i).h; } popMatrix(); + if(heightOverLimit){ + strokeWeight(3); + fill(255); + line(width-5,-scrollAmount+4,width-5,height-120+(maxSurfaceHeight-120-totalBrickHeight)-scrollAmount-4); + //-scrollAmount + (-1*(maxSurfaceHeight-120-totalBrickHeight))); + } fill(68, 68, 68); noStroke(); rect(0, height-120, width, 120); diff --git a/source.pde b/source.pde index 28af53f..8c76a04 100644 --- a/source.pde +++ b/source.pde @@ -38,6 +38,9 @@ class SourceManager { //no constructor void setImage(PImage img) { //set image to source source = img.get(); fallbackImage = source; + nativeResoX = source.width; + nativeResoY = source.height; + println(nativeResoX); } void fallback() {