Quantcast

Moved stuff around a bit

Darthpred [06-21-15 - 10:07]
Moved stuff around a bit
Filename
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/locales/russian.lua
ElvUI_SLE/modules/raidroleicons.lua
ElvUI_SLE/options/load_options.xml
ElvUI_SLE/options/raidroleicons_c.lua
ElvUI_SLE/options/unitframes_c.lua
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index 974cc0c..e141c33 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -461,7 +461,11 @@ P['sle'] = {
 		},
 	},

-	['blizzraidroles'] = false,
+	['raidmanager'] = {
+		['level'] = true,
+		['roles'] = false,
+	},
+
 }

 P.chat.editboxhistory = 5
diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua
index e5820e8..9cbd421 100644
--- a/ElvUI_SLE/locales/russian.lua
+++ b/ElvUI_SLE/locales/russian.lua
@@ -473,9 +473,11 @@ L["This options will allow you to detach your classbar from player's frame and m
 L["Power Text Position"] = "Позиция текста ресурса"
 L["Position power text on this bar of chosen frame"] = "Позиционировать текст ресурса относительно выбранной полосы на каждой рамке"
 L["Choose what icon set will unitframes and chat use."] = "Набор иконок для использования на рамках юнитов и в чате."
-L["Use role icons in Blizzard raid manager"] = "Показывать иконки в менеджере рейда Blizzard"
-L["Show/hide role icons in raid manager \"O -> Raid\"."] = "Показывать/скрывать иконки роли в менеджере рейда \"О -> Рейд\""

+--Raid Manager--
+L["Options for customizing Blizzard Raid Manager \"O - > Raid\""] = "Опции настройки менеджера рейда \"О -> Рейд\""
+L["Show role icons"] = "Показывать иконки роли"
+L["Show level"] = "Показывать уровень"

 L["Enhanced Vehicle Bar"] = "Улучшенный контроль машин"
 L["A different look/feel vehicle bar based on work by Azilroka"] = "Использовать улучшенную панель управления средствами передвижения, основанную на коде Azilroka"
diff --git a/ElvUI_SLE/modules/raidroleicons.lua b/ElvUI_SLE/modules/raidroleicons.lua
index b36f2bb..40005b8 100644
--- a/ElvUI_SLE/modules/raidroleicons.lua
+++ b/ElvUI_SLE/modules/raidroleicons.lua
@@ -5,25 +5,30 @@ local GetNumGroupMembers, IsInGroup, IsInRaid = GetNumGroupMembers, IsInGroup, I
 local PLAYER_REALM = gsub(E.myrealm,'[%s%-]','')

 function B:CreateAndUpdateIcons()
-	-- if not IsInGroup() then return end
 	local members = GetNumGroupMembers()
 	for i = 1, members do
 		local frame = _G["RaidGroupButton"..i]
-		if frame and not frame.subframes then E:Delay(1, B.CreateAndUpdateIcons); return end
+		if (frame and not frame.subframes) or not E.db.sle.raidmanager then E:Delay(1, B.CreateAndUpdateIcons); return end
+		local parent = E.db.sle.raidmanager.level and frame.subframes.level or frame.subframes.class
+		if E.db.sle.raidmanager.level then
+			frame.subframes.level:Show()
+		else
+			frame.subframes.level:Hide()
+		end
 		if not frame.sleicon then
 			frame.sleicon = CreateFrame("Frame", nil, frame)
 			frame.sleicon:SetSize(14, 14)
-			frame.sleicon:SetPoint("RIGHT", frame.subframes.level, "LEFT", 2, 0)
 			RaiseFrameLevel(frame.sleicon)

 			frame.sleicon.texture = frame.sleicon:CreateTexture(nil, "OVERLAY")
 			frame.sleicon.texture:SetAllPoints(frame.sleicon)
 		end
+		frame.sleicon:SetPoint("RIGHT", parent, "LEFT", 2, 0)
 		local unit = IsInRaid() and "raid" or "party"
 		local role = UnitGroupRolesAssigned(unit..i)
 		local name, realm = UnitName(unit..i)
 		local texture = ""
-		if (role and role ~= "NONE") and name and E.db.sle.roleicons and E.db.sle.blizzraidroles then
+		if (role and role ~= "NONE") and name and E.db.sle.roleicons and E.db.sle.raidmanager.roles then
 			name = (realm and realm ~= '') and name..'-'..realm or name ..'-'..PLAYER_REALM;
 			texture = SLE.rolePaths[E.db.sle.roleicons][role]
 		end
@@ -39,4 +44,6 @@ function B:RaidLoaded(event, addon)
 	end
 end

-B:RegisterEvent("ADDON_LOADED", "RaidLoaded")
\ No newline at end of file
+B:RegisterEvent("ADDON_LOADED", "RaidLoaded")
+
+
diff --git a/ElvUI_SLE/options/load_options.xml b/ElvUI_SLE/options/load_options.xml
index 6f71727..23e291a 100644
--- a/ElvUI_SLE/options/load_options.xml
+++ b/ElvUI_SLE/options/load_options.xml
@@ -26,4 +26,5 @@
 	<Script file='vehicle_c.lua'/>
 	<Script file='errorframe_c.lua'/>
 	<Script file='quests_c.lua'/>
+	<Script file='raidroleicons_c.lua'/>
 </Ui>
\ No newline at end of file
diff --git a/ElvUI_SLE/options/raidroleicons_c.lua b/ElvUI_SLE/options/raidroleicons_c.lua
new file mode 100644
index 0000000..cd55b5c
--- /dev/null
+++ b/ElvUI_SLE/options/raidroleicons_c.lua
@@ -0,0 +1,38 @@
+local E, L, V, P, G = unpack(ElvUI);
+local SLE = E:GetModule('SLE')
+local B = E:GetModule("SLE_BlizzRaid")
+
+local function configTable()
+	E.Options.args.sle.args.options.args.general.args.raidmanager = {
+		type = "group",
+		name = RAID..[[ |TInterface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon:0:0:0:-1|t]],
+		order = 80,
+		args = {
+			header = {
+				order = 1,
+				type = "header",
+				name = RAID,
+			},
+			info = {
+				order = 2,
+				type = "description",
+				name = L["Options for customizing Blizzard Raid Manager \"O - > Raid\""],
+			},
+			roles = {
+				order = 3,
+				type = "toggle",
+				name = L["Show role icons"],
+				get = function(info) return E.db.sle.raidmanager.roles end,
+				set = function(info, value) E.db.sle.raidmanager.roles = value; E:GetModule("SLE_BlizzRaid"):CreateAndUpdateIcons() end,
+			},
+			level = {
+				order = 4,
+				type = "toggle",
+				name = L["Show level"],
+				get = function(info) return E.db.sle.raidmanager.level end,
+				set = function(info, value) E.db.sle.raidmanager.level = value; E:GetModule("SLE_BlizzRaid"):CreateAndUpdateIcons() end,
+			},
+		},
+	}
+end
+table.insert(E.SLEConfigs, configTable)
\ No newline at end of file
diff --git a/ElvUI_SLE/options/unitframes_c.lua b/ElvUI_SLE/options/unitframes_c.lua
index 80db389..b8d14d0 100644
--- a/ElvUI_SLE/options/unitframes_c.lua
+++ b/ElvUI_SLE/options/unitframes_c.lua
@@ -21,7 +21,7 @@ local function configTable()

 	E.Options.args.sle.args.options.args.general.args.unitframes = {
 		type = "group",
-		name = L["UnitFrames"]..[[ |TInterface\OptionsFrame\UI-OptionsFrame-NewFeatureIcon:0:0:0:-1|t]],
+		name = L["UnitFrames"],
 		order = 88,
 		args = {
 			header = {
@@ -70,14 +70,6 @@ local function configTable()
 							["MiirGui"] = "MiirGui ".."|T"..texPath.."mg-tank:15:15:0:0:64:64:2:56:2:56|t ".."|T"..texPath.."mg-healer:15:15:0:0:64:64:2:56:2:56|t ".."|T"..texPath.."mg-dps:15:15:0:0:64:64:2:56:2:56|t ",
 						},
 					},
-					blizzraidroles = {
-						order = 3,
-						type = "toggle",
-						name = L["Use role icons in Blizzard raid manager"],
-						desc = L["Show/hide role icons in raid manager \"O -> Raid\"."],
-						get = function(info) return E.db.sle.blizzraidroles end,
-						set = function(info, value) E.db.sle.blizzraidroles = value; E:GetModule("SLE_BlizzRaid"):CreateAndUpdateIcons() end,
-					},
 				},
 			},
 		},