Closed KrabCode closed 2 months ago
maybe there's a way to push / pop this? to avoid changing anything on the user's side
Yes! Tint can be controlled with pushStyle() and popStyle().
PImage img;
void setup() {
size(1333, 1000);
img = loadImage("PXL_20240523_112838077.png");
}
void draw() {
pushStyle();
tint(255, 0, 0);
popStyle();
image(img, 0, 0);
}
This darkens the GUI when the tint is non-white. Calling tint(255) solves it. But it shouldn't darken the GUI at all, it shouldn't require the user to reset the tint before the end of draw(). Let's reset the tint ourselves while drawing the GUI then.