Have object show at location of right click when center screen's content?

brandan shared this problem 5 years ago

I want to have a "menu" appear when I right click. I'm using the cursor x and cursor y constants to move the menu and have it appear where the user right clicks. This basically works when I don't have the "Center screen's content" box checked for a screen. However, it doesn't work when the box is checked. How can I get it to work when I center the screen's content?