show decisecond when timer is at one second
Hello,
usually I write something like %.1f instead of %d to get it to show one decimalpoint. But I want to make it so that it only turns to decimalpoint when the timer is at one (1) second. so 3, 2, 1 ,0.9, 0.8. 0.7 etc. Is there a simple solution to make this happen? Thank you. |
just string.format(val >= 1 and "%d" or "%.1f", val))
|
ty:) will try to work with that
|
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) Blizz-Code:https://github.com/tomrus88/Blizzard.../BuffFrame.lua |
I've inserted the suggested code where it is likely to do what you want. Give that a go. This link points out the similarities between SetFormattedText and string.format. https://wowpedia.fandom.com/wiki/API...tFormattedText
Quote:
|
Code:
function AuraButton_UpdateDuration(auraButton, timeLeft) Thank you :) |
All times are GMT -6. The time now is 12:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI