From c3bfca6a549d76a603e9cd0382d00b45537c16a4 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sun, 21 Jun 2015 14:07:33 +0400 Subject: [PATCH] Moved stuff around a bit --- ElvUI_SLE/defaults/profile.lua | 6 +++++- ElvUI_SLE/locales/russian.lua | 6 ++++-- ElvUI_SLE/modules/raidroleicons.lua | 17 ++++++++++----- ElvUI_SLE/options/load_options.xml | 1 + ElvUI_SLE/options/raidroleicons_c.lua | 38 +++++++++++++++++++++++++++++++++ ElvUI_SLE/options/unitframes_c.lua | 10 +-------- 6 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 ElvUI_SLE/options/raidroleicons_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 @@