View Single Post
06-21-21, 05:26 AM   #4
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok, I tried to find a code for the default buff/debuff frames to put it together.

Found this:

Code:
function AuraButton_UpdateDuration(auraButton, timeLeft)
	local duration = auraButton.duration;
	if ( SHOW_BUFF_DURATIONS == "1" and timeLeft ) then
		duration:SetFormattedText(SecondsToTimeAbbrev(timeLeft));
		if ( timeLeft < BUFF_DURATION_WARNING_TIME ) then
			duration:SetVertexColor(1,1,1);
		else
			duration:SetVertexColor(1,1,1);
		end
		duration:Show();
	else
		duration:Hide();
	end
end
I am unsure how to use string.format in this case.

Blizz-Code:https://github.com/tomrus88/Blizzard.../BuffFrame.lua

Last edited by rulezyx : 06-21-21 at 05:58 AM.
  Reply With Quote