WoW:API and scripting quirks: Difference between revisions
Jump to navigation
Jump to search
m
no edit summary
m (→World of Warcraft Scripting Quirks: Added note to look in Logs directory.) |
mNo edit summary |
||
| Line 20: | Line 20: | ||
* [[Output]] | * [[Output]] | ||
** The only file output allowed is when the UI engine saves variables before it exits or reloads. Addons use the ## SavedVariables: header to indicate which data they wish to save. | ** The only file output allowed is when the UI engine saves variables before it exits or reloads. Addons use the ## SavedVariables: header to indicate which data they wish to save. | ||
** Another way to output data is to save certain variables using the SetCVar() function. This will immediatly do an export of the config.wtf file that contains various in game variables. This will not allow you to create new variables to export out, just set non default values to | ** Another way to output data is to save certain variables using the SetCVar() function. This will immediatly do an export of the config.wtf file that contains various in game variables. This will not allow you to create new variables to export out, just set non default values to certain in game variables. | ||
* [[World of Warcraft API|Functions]] | * [[World of Warcraft API|Functions]] | ||
** x,y = GetCursorPosition(); will return the current position of the mouse '''with respect to the object it currently is in'''. This means x will be 0 if the mouse is at the left edge of a frame or button, regardless of where that frame or button is. | ** x,y = GetCursorPosition(); will return the current position of the mouse '''with respect to the object it currently is in'''. This means x will be 0 if the mouse is at the left edge of a frame or button, regardless of where that frame or button is. | ||
** x,y = GetCursorPosition(UIParent); will return the current position of the mouse with respect to the entire UI. This can be considered the absolute position.. | ** x,y = GetCursorPosition(UIParent); will return the current position of the mouse with respect to the entire UI. This can be considered the absolute position.. | ||