Quantcast

Some growth options. This closes #331

Darthpred [09-10-16 - 11:51]
Some growth options. This closes #331
Filename
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/locales/english.lua
ElvUI_SLE/locales/russian.lua
ElvUI_SLE/modules/minimap/minimapicons.lua
ElvUI_SLE/options/minimap/minimapicons_c.lua
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index ece908c..79c4083 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -478,6 +478,8 @@ P["sle"] = {
 			["skindungeon"] = false,
 			["skinmail"] = false,
 			["spacing"] = 4,
+			["growth_hor"] = "Right",
+			["growth_vert"] = "Down",
 		},
 		["instance"] = {
 			["enable"] = false,
diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua
index 78ddcc6..5799e61 100644
--- a/ElvUI_SLE/locales/english.lua
+++ b/ElvUI_SLE/locales/english.lua
@@ -591,6 +591,8 @@ L["Justify Text"] = true
 L["Hearthstone Location"] = true
 L["Show the name on location your Heathstone is bound to."] = true
 L["Only Number"] = true
+L["Horizontal Growth"] = true
+L["Vertical Growth"] = true


 --Miscs
diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua
index ae2f450..a78e903 100644
--- a/ElvUI_SLE/locales/russian.lua
+++ b/ElvUI_SLE/locales/russian.lua
@@ -583,6 +583,8 @@ L["Justify Text"] = "Выравнивание тектса"
 L["Hearthstone Location"] = "Привязка камня"
 L["Show the name on location your Heathstone is bound to."] = "Показывать имя локации, к которой привязан камень возвращения."
 L["Only Number"] = "Только цифры"
+L["Horizontal Growth"] = "Горизонтаьный рост"
+L["Vertical Growth"] = "Вертикальный рост"

 --Miscs
 L["Error Frame"] = "Фрейм ошибок"
diff --git a/ElvUI_SLE/modules/minimap/minimapicons.lua b/ElvUI_SLE/modules/minimap/minimapicons.lua
index 9498e11..dd6830e 100644
--- a/ElvUI_SLE/modules/minimap/minimapicons.lua
+++ b/ElvUI_SLE/modules/minimap/minimapicons.lua
@@ -303,8 +303,10 @@ function SMB:Update()
 				AnchorX = 1
 				Maxed = true
 			end
-			local yOffset = - Spacing - ((Size + Spacing) * (AnchorY - 1))
-			local xOffset = Spacing + ((Size + Spacing) * (AnchorX - 1))
+			local direction_hor = E.db.sle.minimap.mapicons.growth_hor == "Right" and 1 or -1
+			local direction_vert = E.db.sle.minimap.mapicons.growth_vert == "Down" and -1 or 1
+			local yOffset = (Spacing + ((Size + Spacing) * (AnchorY - 1)))*direction_vert
+			local xOffset = (Spacing + ((Size + Spacing) * (AnchorX - 1)))*direction_hor
 			Frame:SetTemplate()
 			Frame:SetBackdropColor(0, 0, 0, 0)
 			Frame:SetParent(SMB.bar)
diff --git a/ElvUI_SLE/options/minimap/minimapicons_c.lua b/ElvUI_SLE/options/minimap/minimapicons_c.lua
index c8d3958..70b8f87 100644
--- a/ElvUI_SLE/options/minimap/minimapicons_c.lua
+++ b/ElvUI_SLE/options/minimap/minimapicons_c.lua
@@ -93,6 +93,30 @@ local function configTable()
 					["Transparent"] = L["Transparent"],
 				},
 			},
+			growth_hor = {
+				order = 10,
+				name = L["Horizontal Growth"],
+				type = "select",
+				disabled = function() return not E.private.sle.minimap.mapicons.enable or not E.private.sle.minimap.mapicons.barenable end,
+				get = function(info) return E.db.sle.minimap.mapicons.growth_hor end,
+				set = function(info, value) E.db.sle.minimap.mapicons.growth_hor = value; SMB:Update(SLE_SquareMinimapButtonBar) end,
+				values = {
+					["Right"] = L["Right"],
+					["Left"] = L["Left"],
+				},
+			},
+			growth_vert = {
+				order = 11,
+				name = L["Vertical Growth"],
+				type = "select",
+				disabled = function() return not E.private.sle.minimap.mapicons.enable or not E.private.sle.minimap.mapicons.barenable end,
+				get = function(info) return E.db.sle.minimap.mapicons.growth_vert end,
+				set = function(info, value) E.db.sle.minimap.mapicons.growth_vert = value; SMB:Update(SLE_SquareMinimapButtonBar) end,
+				values = {
+					["Down"] = L["Down"],
+					["Up"] = L["Up"],
+				},
+			},
 		},
 	}
 end