Position tooltip side by side

Hey,
I’ve implemented a second tooltip for “compare” purposes, but I am having trouble positioning it correctly.
What I want to achieve is for the second tooltip that is the “compare” one, to appear to the side of main item tooltip while at the same time position itself correctly depending on which side the item tooltip appears. Just like the normal tooltip does.

At the moment I was using the same item tooltip position and gave the item tooltip gameobject corners positions.

Anyone got any ideas? Thanks.

Take the corners of the original tooltip, if the upper left hand corner is less than Screen.width, place the comparison tooltip at the upper left hand corner - (width, 0)
otherwise, put it at the upper right hand corner.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms