ToolTip going off screen

Hello, I’m having an issue with my Item ToolTips, it seems as, if the tooltip is activated from too far right on the screen it just rolls off, making the buttons impossible to press. I was thinking of a fix such as seeing if the position of the spawned tooltip is too close to the right edge of the screen and taking away (minus) the x-axis location by a set amount. However, the issue I’m having is finding out if it’s too close to the right edge of the screen as every monitor is different.
Below is an image example of it rolling off the screen if it’s any help

Any help in this would be greatly appreciated, thanks.