Reputation: 33
I have been looking at this and could not find anything to really help.
I want to make my canvas in Processing to stay over the top of other windows, I have worked out how to do this but when you load up a game the game hides the canvas behind it.
I have found that the following has to be used but I do not know or in what context compared to processing:
DirectDraw or inject a dll and hook directx
Upvotes: 2
Views: 2500
Reputation: 42176
If you're using Processing 3 (and you should be), then you should no longer use the frame
variable- the other answer doesn't seem to do anything in Processing 3.
Instead, use the surface
variable:
void setup(){
size(200, 200);
surface.setAlwaysOnTop(true);
}
void draw(){
background(0);
ellipse(mouseX, mouseY, 10, 10);
}
More info on the changes made in Processing 3 can be found here and here.
Upvotes: 2
Reputation: 6145
No need to hook DirectX yourself, just insert this line in your setup
function:
frame.setAlwaysOnTop(true);
(As an aside, this thread on the Processing forum was the first result when googling "processing window stay on top").
Upvotes: 1