GUI ofTranslate problem

Hello everyone,

I am currently facing a display issue that I do not understand.
I am trying to create my GUI application using ofxUI until then everything works. The application has three components: a video player displaying the webcam, graphics and buttons on the side. Currently, graphic and webcam were superimposed. To the graph below, so I’m doing a ofTranslate (0, 493);
The problem is that this also shifts my GUI. I tried this: gui = new ofxUICanvas (650, -493 200 100); to display it in the right place but there is a mistake. Visually buttons are in the right place but the clickable area is 493 pixels above the button.

How to solve this problem and does not affect my ofTranslate to my gui?
Thank you for your help.

Try placing the ofTranslate and other relevant drawing calls between ofPushMatrix() and ofPopMatrix calls, that way the transformations are only done to those specific drawings and all the other elements (such as your GUI) should be unaffacted.


1 Like

Eureka ! It works
Thanks a lot for your help.