nameplates: add option to show spellname

This commit is contained in:
shagu
2016-12-02 20:06:00 +01:00
parent 9614443ea7
commit f7fccc38fa
3 changed files with 18 additions and 0 deletions
+1
View File
@@ -90,6 +90,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("chat", "global", "bgcolor", ".2,.2,.2")
pfUI:UpdateConfig("chat", "global", "bgtransp", ".5")
pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1")
pfUI:UpdateConfig("nameplates", nil, "spellname", "0")
pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "0")
pfUI:UpdateConfig("nameplates", nil, "clickthrough", "0")
pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16")
+1
View File
@@ -725,6 +725,7 @@ pfUI:RegisterModule("gui", function ()
-- nameplates
pfUI.gui.nameplates = pfUI.gui:CreateConfigTab("Nameplates")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show castbars:", pfUI_config.nameplates, "showcastbar", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show spellname:", pfUI_config.nameplates, "spellname", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show debuffs:", pfUI_config.nameplates, "showdebuffs", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Enable Clickthrough:", pfUI_config.nameplates, "clickthrough", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Raidicon size:", pfUI_config.nameplates, "raidiconsize")
+16
View File
@@ -224,6 +224,15 @@ pfUI:RegisterModule("nameplates", function ()
healthbar.castbar.text:SetFont(STANDARD_TEXT_FONT, 10, "OUTLINE")
end
if healthbar.castbar.spell == nil then
healthbar.castbar.spell = healthbar.castbar:CreateFontString("Status", "DIALOG", "GameFontNormal")
healthbar.castbar.spell:SetPoint("CENTER", healthbar.castbar, "CENTER")
healthbar.castbar.spell:SetNonSpaceWrap(false)
healthbar.castbar.spell:SetFontObject(GameFontWhite)
healthbar.castbar.spell:SetTextColor(1,1,1,1)
healthbar.castbar.text:SetFont(STANDARD_TEXT_FONT, 10, "OUTLINE")
end
if healthbar.castbar.icon == nil then
healthbar.castbar.icon = healthbar.castbar:CreateTexture(nil, "BORDER")
healthbar.castbar.icon:ClearAllPoints()
@@ -249,6 +258,13 @@ pfUI:RegisterModule("nameplates", function ()
healthbar.castbar:SetMinMaxValues(0, pfUI.castbar.target.casterDB[name:GetText()]["casttime"])
healthbar.castbar:SetValue(GetTime() - pfUI.castbar.target.casterDB[name:GetText()]["starttime"])
healthbar.castbar.text:SetText(round( pfUI.castbar.target.casterDB[name:GetText()]["starttime"] + pfUI.castbar.target.casterDB[name:GetText()]["casttime"] - GetTime(),1))
if healthbar.castbar.spell then
if pfUI_config.nameplates.spellname == "1" then
healthbar.castbar.spell:SetText(pfUI.castbar.target.casterDB[name:GetText()]["cast"])
else
healthbar.castbar.spell:SetText("")
end
end
healthbar.castbar:Show()
if pfUI.castbar.target.casterDB[name:GetText()]["icon"] then