Download
(4 Kb)
Download
Updated: 11-27-11 11:43 PM
Updated:11-27-11 11:43 PM
Created:09-14-11 02:57 AM
Downloads:129
Favorites:1
MD5:
LibFlash-Rift
Version: v1.2.1
by: starlon [More]
This library is implemented based on the design of WoW's UIFlash and UIFade functions.

LibFlash implements frame fading and flashing.

All durations are in seconds format, so 0.3 is equal to 300 milliseconds.

Usage:
local LibFlash = LibStub("LIbFlash")
local frame = CreateFrame("Frame")
-- do things to the frame so it'll display
local background = LibFlash:New(frame)
background:FadeIn(.3, 0, 1)

Methods:

LibFlash:New(frame)
@argument frame The frame that will have its alpha manipulated.
@return A new LibFlash object.
Description: Create a new LibFlash object.

LibFlashel()
@return None
Description: Recycles a LibFlash object.

LibFlash:FadeIn(dur, start, finish, callback, data)
@argument dur Number - The fade's duration.
@argument start Number - The starting alpha value.
@argument end Number - The ending alpha value.
@argument callback Function - You can specify a function to be called when the fade in is finished.
@argument data Unknown - This will be passed to the callback function when it's called.
@return None
Description: Fade this object's target frame starting with 'start' alpha and ending with 'finish' alpha.

LibFlash:FadeOut(dur, start, finish, callback, data)
@argument dur Number - The fade's duration.
@argument start Number - The starting alpha value.
@argument end Number - The ending alpha value.
@argument callback Function - You can specify a function to be called when the fade in is finished.
@argument data Unknown - This will be passed to the callback function when it's called.
@return None
Description: Fade this object's target frame starting with 'start' alpha and ending with 'finish' alpha.

LibFlash:Flash(fadeInTime, fadeOutTime, flashDuration, showWhenDone, flashInHoldTime, flashOutHoldTime, shouldBlink, blinkRate, callback, data )
@argument fadeInTime Number - duration of the fade in effect.
@argument fadeOutTime Number - duration of the fade out effect.
@argument flashDuration Number - number of seconds to keep repeating the fade in / out cycle.
@argument showWhenDone Boolean - should the frame be visible at the end?
@argument flashInHoldTime Number - number of seconds to hold the fully hidden state.
@argument flashOutHoldTime Number - number of seconds to hold the fully visible state.
@argument shouldBlink Boolean - Should this alarm blink
@argument blinkRate Number - Rate at which the alarm will blink.
@argument callback Function - Will be called when the flash finishes.
@argument data Unknown - Data to be passed to the callback.
@return None
Description: Flash a frame in and then out.
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
v1.1-alpha
4kB
starlon
09-14-11 02:57 AM


Post A Reply Comment Options
Unread 10-07-11, 07:39 AM  
Rustycage
Claw of Regulos
 
Rustycage's Avatar

Forum posts: 20
File comments: 150
Uploads: 0
Re: Re: Awesome concept.

Quote:
Originally posted by starlon
You may find issues with raid frames, as they're more than likely "secured" -- meaning they're restrictive during combat, so things like moving, setting alpha, hiding, showing, resizing, etc... none of that functions while the frame is marked secure.

As far as how to use this, check out StarTip-Rift's use of the library. You'll find it in StarTip.lua in tooltipMain:FadeOut(). I'm only making use of Fade() though.
I see that in there, but I just don't understand lol... I wish I did, because if this does what I have always wanted frames on the UI to do, then I definitely want it to work, but when put it in the AddOns folder it does nothing in game at all... and I don't know why.
Rustycage is offline Report comment to moderator  
Reply With Quote
Unread 10-06-11, 10:12 PM  
starlon
Claw of Regulos
 
starlon's Avatar
AddOn Author - Click to view AddOns

Forum posts: 10
File comments: 24
Uploads: 8
Re: Awesome concept.

Quote:
Originally posted by Rustycage
I like this idea, but I just can't seem to figure out how to make it work. I also wanted to ask if it would work with Unit Frame replacements like MinUI from here?
You may find issues with raid frames, as they're more than likely "secured" -- meaning they're restrictive during combat, so things like moving, setting alpha, hiding, showing, resizing, etc... none of that functions while the frame is marked secure.

As far as how to use this, check out StarTip-Rift's use of the library. You'll find it in StarTip.lua in tooltipMain:FadeOut(). I'm only making use of Fade() though.
starlon is offline Report comment to moderator  
Reply With Quote
Unread 10-06-11, 06:41 AM  
Rustycage
Claw of Regulos
 
Rustycage's Avatar

Forum posts: 20
File comments: 150
Uploads: 0
Awesome concept.

I like this idea, but I just can't seem to figure out how to make it work. I also wanted to ask if it would work with Unit Frame replacements like MinUI from here?
Rustycage is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: