From 2d25ee99623ac7816f3a6c7054a96ff29d695797 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 9 Nov 2012 18:05:35 +0400 Subject: [PATCH] Show/hide conversion --- ElvUI_SLE/modules/backgrounds/backgrounds.lua | 29 ++++++------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/ElvUI_SLE/modules/backgrounds/backgrounds.lua b/ElvUI_SLE/modules/backgrounds/backgrounds.lua index 6c02635..420ad18 100644 --- a/ElvUI_SLE/modules/backgrounds/backgrounds.lua +++ b/ElvUI_SLE/modules/backgrounds/backgrounds.lua @@ -92,28 +92,13 @@ end --Visibility / Enable check function BG:FramesVisibility() - if E.db.sle.backgrounds.bottom.enabled then - BGb:Show() - else - BGb:Hide() - end - - if E.db.sle.backgrounds.left.enabled then - BGl:Show() - else - BGl:Hide() - end - - if E.db.sle.backgrounds.right.enabled then - BGr:Show() - else - BGr:Hide() - end - - if E.db.sle.backgrounds.action.enabled then - BGa:Show() - else - BGa:Hide() + local db = E.db.sle.backgrounds + for k,v in pairs(Fr) do + if db[v[2]].enabled then + v[1]:Show() + else + v[1]:Hide() + end end end -- 1.7.9.5