added scrollbar, added button to render in images native resolution
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
PImage bin;
|
PImage bin;
|
||||||
int maxSurfaceHeight = 500;
|
int maxSurfaceHeight = 500;
|
||||||
|
int nativeResoX, nativeResoY;
|
||||||
|
|
||||||
public class SecondApplet extends PApplet {
|
public class SecondApplet extends PApplet {
|
||||||
ControlP5 cp5;
|
ControlP5 cp5;
|
||||||
@@ -46,6 +46,12 @@ public class SecondApplet extends PApplet {
|
|||||||
.plugTo(this, "CP5_pauseAllAction");
|
.plugTo(this, "CP5_pauseAllAction");
|
||||||
pauseAll.getCaptionLabel().getStyle().setMargin(-17, 0, 0, 20);
|
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")
|
Toggle saveParams = cp5.addToggle("save parameters")
|
||||||
.setPosition(100, height-45)
|
.setPosition(100, height-45)
|
||||||
@@ -60,6 +66,10 @@ public class SecondApplet extends PApplet {
|
|||||||
binS = 40;
|
binS = 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CP5_nativeResoAction() {
|
||||||
|
renderSize = max(nativeResoX, nativeResoY);
|
||||||
|
//renderer.setSize(nativeResoX, nativeResoY);
|
||||||
|
}
|
||||||
void CP5_recordAction() {
|
void CP5_recordAction() {
|
||||||
recording = !recording;
|
recording = !recording;
|
||||||
}
|
}
|
||||||
@@ -92,6 +102,12 @@ public class SecondApplet extends PApplet {
|
|||||||
totalBrickHeight+= bricks.get(i).h;
|
totalBrickHeight+= bricks.get(i).h;
|
||||||
}
|
}
|
||||||
popMatrix();
|
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);
|
fill(68, 68, 68);
|
||||||
noStroke();
|
noStroke();
|
||||||
rect(0, height-120, width, 120);
|
rect(0, height-120, width, 120);
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ class SourceManager { //no constructor
|
|||||||
void setImage(PImage img) { //set image to source
|
void setImage(PImage img) { //set image to source
|
||||||
source = img.get();
|
source = img.get();
|
||||||
fallbackImage = source;
|
fallbackImage = source;
|
||||||
|
nativeResoX = source.width;
|
||||||
|
nativeResoY = source.height;
|
||||||
|
println(nativeResoX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fallback() {
|
void fallback() {
|
||||||
|
|||||||
Reference in New Issue
Block a user