Quantcast

Some shadow changes. This partically covers #442

Darth Predator [03-30-17 - 07:27]
Some shadow changes. This partically covers #442
Filename
ElvUI_SLE/defaults/private.lua
ElvUI_SLE/locales/english.lua
ElvUI_SLE/locales/german.lua
ElvUI_SLE/locales/russian.lua
ElvUI_SLE/modules/enhancedshdows.lua
ElvUI_SLE/options/enhancedshadows_c.lua
diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua
index b663aac..c065691 100644
--- a/ElvUI_SLE/defaults/private.lua
+++ b/ElvUI_SLE/defaults/private.lua
@@ -116,6 +116,19 @@ V["sle"] = {
 				["stancebar"] = false,
 				["microbar"] = false,
 				["petbar"] = false,
+				["bar1buttons"] = false,
+				["bar2buttons"] = false,
+				["bar3buttons"] = false,
+				["bar4buttons"] = false,
+				["bar5buttons"] = false,
+				["bar6buttons"] = false,
+				["bar7buttons"] = false,
+				["bar8buttons"] = false,
+				["bar9buttons"] = false,
+				["bar10buttons"] = false,
+				["stancebarbuttons"] = false,
+				["microbarbuttons"] = false,
+				["petbarbuttons"] = false,
 			},
 		},
 	},
diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua
index 32b8db3..53e2e7b 100644
--- a/ElvUI_SLE/locales/english.lua
+++ b/ElvUI_SLE/locales/english.lua
@@ -445,6 +445,10 @@ L["Order of each toon. Smaller numbers will go first"] = true
 --Enhnced Shadows
 L["Enhanced Shadows"] = true
 L["Use shadows on..."] = true
+L["SLE_EnhShadows_BarButtons_Option"] = "Bar %s Buttons"
+L["SLE_EnhShadows_MicroButtons_Option"] = "Microbar Buttons"
+L["SLE_EnhShadows_StanceButtons_Option"] = "Stance Bar Buttons"
+L["SLE_EnhShadows_PetButtons_Option"] = "Pet Bar Buttons"

 --Equip Manager
 L["Equipment Manager"] = true
diff --git a/ElvUI_SLE/locales/german.lua b/ElvUI_SLE/locales/german.lua
index c91b143..c244c15 100644
--- a/ElvUI_SLE/locales/german.lua
+++ b/ElvUI_SLE/locales/german.lua
@@ -436,6 +436,10 @@ L["Order of each toon. Smaller numbers will go first"] = "Anordnung von jedem Tw
 --Enhnced Shadows
 L["Enhanced Shadows"] = "Erweiterte Schatten"
 L["Use shadows on..."] = "Benutze Schatten auf..."
+L["SLE_EnhShadows_BarButtons_Option"] = "Bar %s Buttons"
+L["SLE_EnhShadows_MicroButtons_Option"] = "Microbar Buttons"
+L["SLE_EnhShadows_StanceButtons_Option"] = "Stance Bar Buttons"
+L["SLE_EnhShadows_PetButtons_Option"] = "Pet Bar Buttons"

 --Equip Manager
 L["Equipment Manager"] = "Ausrüstungsmanager"
diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua
index 41bdae1..90bbf1c 100644
--- a/ElvUI_SLE/locales/russian.lua
+++ b/ElvUI_SLE/locales/russian.lua
@@ -435,6 +435,10 @@ L["Order of each toon. Smaller numbers will go first"] = "Порядок пер
 --Enhnced Shadows
 L["Enhanced Shadows"] = "Улучшенные тени"
 L["Use shadows on..."] = "Использовать тени на..."
+L["SLE_EnhShadows_BarButtons_Option"] = "Кнопки панели %s"
+L["SLE_EnhShadows_MicroButtons_Option"] = "Кнопки микроменю"
+L["SLE_EnhShadows_StanceButtons_Option"] = "Кнопки стоек"
+L["SLE_EnhShadows_PetButtons_Option"] = "Кнопки питомца"

 --Equip Manager
 L["Equipment Manager"] = "Менеджер экипировки"
diff --git a/ElvUI_SLE/modules/enhancedshdows.lua b/ElvUI_SLE/modules/enhancedshdows.lua
index a101c34..f9d5328 100644
--- a/ElvUI_SLE/modules/enhancedshdows.lua
+++ b/ElvUI_SLE/modules/enhancedshdows.lua
@@ -34,7 +34,7 @@ function ES:UpdateShadows()
 	end
 end

-function ES:RegisterShadow(shadow)
+function ES:RegisterShadow(shadow, frame)
 	if shadow.isRegistered then return end
 	ES.shadows[shadow] = true
 	shadow.isRegistered = true
@@ -59,6 +59,7 @@ function ES:CreateShadows()
 			frame.EnhShadow = frame.shadow
 			frame.shadow = nil
 			ES:RegisterShadow(frame.EnhShadow)
+			frame.EnhShadow:SetParent(frame)
 			hooksecurefunc(UF, "Update_"..name.."Frame", ES.UpdateFrame)
 		end
 	end
@@ -71,6 +72,7 @@ function ES:CreateShadows()
 				frame.EnhShadow = frame.shadow
 				frame.shadow = nil
 				ES:RegisterShadow(frame.EnhShadow)
+				frame.EnhShadow:SetParent(frame)
 				hooksecurefunc(UF, "Update_"..name.."Frames", ES.UpdateFrame)
 			end
 		end
@@ -82,6 +84,17 @@ function ES:CreateShadows()
 			frame.EnhShadow = frame.shadow
 			frame.shadow = nil
 			ES:RegisterShadow(frame.EnhShadow)
+			frame.EnhShadow:SetParent(frame.backdrop)
+		end
+		if E.private.sle.module.shadows.actionbars["bar"..i.."buttons"] then
+			for j = 1, 12 do
+				local frame = _G["ElvUI_Bar"..i.."Button"..j]
+				frame:CreateShadow()
+				frame.EnhShadow = frame.shadow
+				frame.shadow = nil
+				ES:RegisterShadow(frame.EnhShadow)
+				frame.EnhShadow:SetParent(frame.backdrop)
+			end
 		end
 	end
 	if E.private.sle.module.shadows.actionbars.stancebar then
@@ -90,6 +103,7 @@ function ES:CreateShadows()
 		frame.EnhShadow = frame.shadow
 		frame.shadow = nil
 		ES:RegisterShadow(frame.EnhShadow)
+		frame.EnhShadow:SetParent(frame.backdrop)
 	end
 	if E.private.sle.module.shadows.actionbars.microbar then
 		local frame = _G["ElvUI_MicroBar"]
@@ -97,6 +111,7 @@ function ES:CreateShadows()
 		frame.EnhShadow = frame.shadow
 		frame.shadow = nil
 		ES:RegisterShadow(frame.EnhShadow)
+		frame.EnhShadow:SetParent(frame.backdrop)
 	end
 	if E.private.sle.module.shadows.actionbars.petbar then
 		local frame = _G["ElvUI_BarPet"]
@@ -104,6 +119,7 @@ function ES:CreateShadows()
 		frame.EnhShadow = frame.shadow
 		frame.shadow = nil
 		ES:RegisterShadow(frame.EnhShadow)
+		frame.EnhShadow:SetParent(frame.backdrop)
 	end
 end

diff --git a/ElvUI_SLE/options/enhancedshadows_c.lua b/ElvUI_SLE/options/enhancedshadows_c.lua
index 517f98e..3476c0a 100644
--- a/ElvUI_SLE/options/enhancedshadows_c.lua
+++ b/ElvUI_SLE/options/enhancedshadows_c.lua
@@ -116,16 +116,31 @@ local function configTable()
 								type = "toggle",
 								name = L["Micro Bar"],
 							},
-							stancebar = {
+							microbarbuttons = {
 								order = 2,
 								type = "toggle",
+								name = L["SLE_EnhShadows_MicroButtons_Option"],
+							},
+							stancebar = {
+								order = 3,
+								type = "toggle",
 								name = L["Stance Bar"],
 							},
+							stancebarbuttons = {
+								order = 4,
+								type = "toggle",
+								name = L["SLE_EnhShadows_StanceButtons_Option"],
+							},
 							petbar = {
-								order = 3,
+								order = 5,
 								type = "toggle",
 								name = L["Pet Bar"],
 							},
+							petbarbuttons = {
+								order = 6,
+								type = "toggle",
+								name = L["SLE_EnhShadows_PetButtons_Option"],
+							},
 						},
 					},
 				},
@@ -135,10 +150,15 @@ local function configTable()

 	for i = 1, (SLE._Compatibility["ElvUI_ExtraActionBars"] and 10 or 6) do
 		E.Options.args.sle.args.modules.args.shadows.args.frames.args.actionbars.args["bar"..i] = {
-			order = i + 3,
+			order = i + 6,
 			type = "toggle",
 			name = L["Bar "]..i,
 		}
+		E.Options.args.sle.args.modules.args.shadows.args.frames.args.actionbars.args["bar"..i.."buttons"] = {
+			order = i + 6,
+			type = "toggle",
+			name = T.format(L["SLE_EnhShadows_BarButtons_Option"], i),
+		}
 	end
 end