Set one of the text displays to a custom function:
Code:
function()
-- first let's get our current mana
local current_mana = UnitPower("player", SPELL_POWER_MANA)
-- now we'll find out how much mana we could have if we were full
local maximum_mana = UnitMaxPower("player", SPELL_POWER_MANA)
-- current divided maximum equals percent, don't forget to multiply by 100. Just like 8th grade math test scores!
local percent_mana = ((current_mana / maximum_mana) * 100)
-- now we just need to format that into a string with one decimal point and the percent symbol
return string.format("%.1f%%", percent_mana)
end
You could string that into one line without all the comments and intermediate variables, but I think it's easier for a non programmer to read and understand what's going on when you see it this way.