Added option for backdrop template in EVB. This closes #287
Darthpred [08-20-16 - 15:19]
Added option for backdrop template in EVB. This closes #287
diff --git a/ElvUI_SLE/modules/vehicle.lua b/ElvUI_SLE/modules/vehicle.lua
index 66677eb..fe06223 100644
--- a/ElvUI_SLE/modules/vehicle.lua
+++ b/ElvUI_SLE/modules/vehicle.lua
@@ -108,6 +108,11 @@ function EVB:BarSize()
bar:SetHeight(self.size + 4);
end
+function EVB:BarBackdrop()
+ if not self.bar then return end
+ self.bar:SetTemplate(E.db.sle.actionbars.vehicle.template)
+end
+
function EVB:Initialize()
if not SLE.initialized then return end
if not E.private.sle.vehicle.enable or not E.private.actionbar.enable then return end;
@@ -131,8 +136,7 @@ function EVB:Initialize()
self.bar = bar;
EVB:BarSize()
-
- bar:SetTemplate("Transparent");
+ EVB:BarBackdrop()
if E.private.sle.module.shadows.vehicle then
bar:CreateShadow();
ES:RegisterShadow(bar.shadow);
@@ -169,6 +173,12 @@ function EVB:Initialize()
AB:UpdateButtonConfig(bar, bindButtons);
AB:PositionAndSizeBar("bar1")
+
+ function EVB:ForUpdateAll()
+ EVB:ButtonsSize()
+ EVB:BarSize()
+ EVB:BarBackdrop()
+ end
end
SLE:RegisterModule(EVB:GetName())
\ No newline at end of file
diff --git a/ElvUI_SLE/options/actionbars_c.lua b/ElvUI_SLE/options/actionbars_c.lua
index ef41c3a..5a19278 100644
--- a/ElvUI_SLE/options/actionbars_c.lua
+++ b/ElvUI_SLE/options/actionbars_c.lua
@@ -104,6 +104,19 @@ local function configTable()
get = function(info) return E.db.sle.actionbars.vehicle[ info[#info] ] end,
set = function(info, value) E.db.sle.actionbars.vehicle[ info[#info] ] = value; EVB:BarSize(); EVB:ButtonsSize() end,
},
+ template = {
+ order = 6,
+ type = "select",
+ name = L["Template"],
+ disabled = function() return not E.private.sle.vehicle.enable end,
+ get = function(info) return E.db.sle.actionbars.vehicle[ info[#info] ] end,
+ set = function(info, value) E.db.sle.actionbars.vehicle[ info[#info] ] = value; EVB:BarSize(); EVB:BarBackdrop() end,
+ values = {
+ ["Default"] = DEFAULT,
+ ["Transparent"] = L["Transparent"],
+ ["NoBackdrop"] = NONE,
+ },
+ },
},
},
},