Hi all
Just a quick question about multiple screens. I'd like to include 2 screens in a project I'm doing. I came across G4P as a way to do this. However I'm having some difficulty incorporating changes (such as transform or scale) to PImages in the second screen. My code so far is below:
import g4p_controls.*;
GWindow window;
int r;
int g;
Boolean MTshow;
PImage mustemp;
public void setup() {
size(480, 320);
window = GWindow.getWindow(this, "My Window", 100, 50, 480, 320, P2D);
window.addDrawHandler(this, "windowDraw");
mustemp = loadImage("mustemp.jpg");
}
public void draw() {
background(r, g, 50);
if (mousePressed) {
MTshow = true;
}
}
public void windowDraw(PApplet app, GWinData data) {
app.background(255, 0, 0);
r = app.mouseX;
g = app.mouseY;
int x = 0;
if (MTshow) {
app.image(mustemp, x, 0, app.width, app.height);
x++;
}
}
Currently, the 'x++' command doesn't seem to be doing anything. Ideally, I'd like to include all my image data into it's own class, but that doesn't seem to be working either. Does anyone have any advice?
Thanks