actionbar: add option for range indicator color

This commit is contained in:
shagu
2016-12-10 20:00:26 +01:00
parent d6746bbdf6
commit 53499a1149
3 changed files with 5 additions and 4 deletions
+2 -3
View File
@@ -37,11 +37,10 @@ pfUI:RegisterModule("actionbar", function ()
this.rangeTimer = this.rangeTimer - elapsed
if ( this.rangeTimer <= 0.1 ) then
if ( IsActionInRange( ActionButton_GetPagedID(this)) == 0 ) then
getglobal(this:GetName() .. 'Icon'):SetVertexColor(1.0, 0.1, 0.1)
getglobal(this:GetName() .. 'NormalTexture'):SetVertexColor(1.0, 0.1, 0.1)
local r,g,b,a = strsplit(",", pfUI_config.bars.rangecolor)
getglobal(this:GetName() .. 'Icon'):SetVertexColor(r,g,b,a)
else
getglobal(this:GetName() .. 'Icon'):SetVertexColor(1,1,1)
getglobal(this:GetName() .. 'NormalTexture'):SetVertexColor(1,1,1)
end
this.rangeTimer = TOOLTIP_UPDATE_TIME
end
+1
View File
@@ -62,6 +62,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("bars", nil, "icon_size", "24")
pfUI:UpdateConfig("bars", nil, "background", "1")
pfUI:UpdateConfig("bars", nil, "glowrange", "0")
pfUI:UpdateConfig("bars", nil, "rangecolor", "1.0,0.1,0.1,1")
pfUI:UpdateConfig("bars", nil, "hide_time", "1")
pfUI:UpdateConfig("bars", nil, "hide_bottom", "0")
pfUI:UpdateConfig("bars", nil, "hide_bottomleft", "0")
+2 -1
View File
@@ -727,7 +727,8 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.bar = pfUI.gui:CreateConfigTab("ActionBar")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Icon Size", pfUI_config.bars, "icon_size")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Show actionbar backgrounds", pfUI_config.bars, "background", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Use red icon as range indicator", pfUI_config.bars, "glowrange", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Use colored icon as range indicator", pfUI_config.bars, "glowrange", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Range indicator Color", pfUI_config.bars, "rangecolor", "color")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Seconds to wait until hide bars", pfUI_config.bars, "hide_time")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Autohide bottom actionbar", pfUI_config.bars, "hide_bottom", "checkbox")
pfUI.gui:CreateConfig(pfUI.gui.bar, "Autohide bottomleft actionbar", pfUI_config.bars, "hide_bottomleft", "checkbox")