i'm making an addon to show my stats, updated in real time, when i'm in my inventory screen. That way i can see my stats change when i equip armor, etc.
Screenshot:
http://imgur.com/r0OsZ6p.png
However, i have no idea how to open and close that window when the player opens it's inventory. Right now the window is showed when I click on an invisible box in the lower left of my screen and hidden when i click again.
Is there a way to open it when the inventory opens and close it when the inventory closes?