Overlay Image Over ControlP5

I have my menu working using controlP5 but now I want to add an error message alert graphic over the top of my GUI.

When ever I try it, my image goes behind my GUI instead of on top.

Any idea how I can add a graphic over the top? This can be a full screen graphic if needed.

Thanks.

Phil

Tagged:

Answers

  • Answer ✓

    Hi, by default controlP5 renders controllers after the procedures inside your sketch's draw() function are completed. you can disable controlP5's automatic rendering with calling cp5.setAutoDraw(false); when running your sketch, you should not see any controllers displayed inside your window. Now, if you add cp5.draw()inside your sketch's draw function, controllers will appear again - and you can draw your image/message alert afterwards.

  • That worked perfectly, thanks.

    Phil

Sign In or Register to comment.