View Single Post
08-03-05, 11:15 AM   #4
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
So i should just put an anchor in the parent frame (MyownFrame) and then when i move it the game automatically saves the position? COOL! so i also dont need to load it then? So technically i can remove all the mo_load and mo_save?

Basically i just want to be able to move it around and keep it at a location where i drop it.
np Yep the game will take care of restoring a window to its new position when you log in. You can think of layout-cache.txt as a "savedvariables" for window positions. It will use the original anchors in the xml, but if on loading it sees the window was moved, it will move it to where it last sat on the screen.

UnitPlayerControlled
UnitCanAttack
UnitReactionColor
I don't think the last one does. You may be thinking of r,g,b=GameTooltip_UnitColor(unit) which returns the color of the tooltip name?

Or n=UnitReaction(unit,unit) which returns a number decribing the relationship between two units. From either of those you could build a color.
  Reply With Quote