WoW:API UIFrameFlash: Difference between revisions
Jump to navigation
Jump to search
UIFrameFlashRemoveFrame has been renamed to UIFrameFlashStop
(name required) |
(UIFrameFlashRemoveFrame has been renamed to UIFrameFlashStop) |
||
| Line 29: | Line 29: | ||
* Flashing works by modifying the frame's alpha value (:SetAlpha). All of the frame's children fade with their parent frame. | * Flashing works by modifying the frame's alpha value (:SetAlpha). All of the frame's children fade with their parent frame. | ||
* You can not flash the WorldFrame (fails silently). | * You can not flash the WorldFrame (fails silently). | ||
* If you try to flash an already flashing frame, the function fails silently. You may use [[API UIFrameIsFading|UIFrameIsFading (frame)]] to detect if a frame is already flashing, and [[API | * If you try to flash an already flashing frame, the function fails silently. You may use [[API UIFrameIsFading|UIFrameIsFading (frame)]] to detect if a frame is already flashing, and [[API UIFrameFlashStop|UIFrameFlashRemoveFrame (frame)]] to stop the flashing cycle prematurely (make sure to set the desired alpha value manually afterwards). | ||
* Once flashDuration expires, the frame's alpha is bluntly set to either 1 or 0 (depending on showWhenDone). Make sure to set a flashDuration value to coincide with the end of a fade in (if you want the frame to remain visible) or fade out (if not). Otherwise, things will look awkward. | * Once flashDuration expires, the frame's alpha is bluntly set to either 1 or 0 (depending on showWhenDone). Make sure to set a flashDuration value to coincide with the end of a fade in (if you want the frame to remain visible) or fade out (if not). Otherwise, things will look awkward. | ||
* The frame MUST have a name, otherwise one of the internal functions causes an error. | * The frame MUST have a name, otherwise one of the internal functions causes an error. | ||