Mouse handling with matrix transformations

edited March 2016 in How To...

I'm looking to create a menu with different clickable buttons that will float on the right side of my window, sliding around nicely when it's resized.

Right now, I'm accomplishing this with a transformation matrix called before drawing all the buttons. However, this breaks all my mouse handling (as the buttons now don't know where they are located on the screen). What is the "right" way to deal with this? Should I just be updating each button's location internally every time the window is resized? Or is there some way to apply an inverse matrix transform to the mouse coordinates before passing them?

Tagged:
Sign In or Register to comment.