└── ElvUI_Sirus
├── Modules
├── Bags
│ ├── Load_Bags.xml
│ └── Bags.lua
├── Chat
│ ├── Load_Chat.xml
│ └── Chat.lua
├── Auras
│ ├── Load_Auras.xml
│ └── Auras.lua
├── Maps
│ ├── Load_Maps.xml
│ └── Minimap.lua
├── DataBars
│ ├── Load_DataBars.xml
│ └── Honor.lua
├── Tooltip
│ └── Load_Tooltip.xml
├── Blizzard
│ ├── Load_Blizzard.xml
│ └── Blizzard.lua
├── Misc
│ ├── Load_Misc.xml
│ └── RaidBuffReminder.lua
├── UnitFrames
│ ├── Units
│ │ ├── Load_Units.xml
│ │ └── Target.lua
│ ├── Elements
│ │ ├── Load_Elements.xml
│ │ └── HeadHuntingWanted.lua
│ └── Load_UnitFrames.xml
├── ActionBars
│ ├── Load_ActionBars.xml
│ └── MicroBar.lua
├── Skins
│ ├── Load_Skins.xml
│ ├── Blizzard
│ │ ├── Sirus_GMClient.lua
│ │ ├── Sirus_GuildHouse.lua
│ │ ├── Sirus_RaidFrame.lua
│ │ ├── Sirus_BlackMarket.lua
│ │ ├── Sirus_ArenaSpectator.lua
│ │ ├── Taxi.lua
│ │ ├── DressingRoom.lua
│ │ ├── Custom_ExtraActionButton.lua
│ │ ├── Sirus_DeathRecap.lua
│ │ ├── Sirus_Timer.lua
│ │ ├── Load_Blizzard.xml
│ │ ├── Sirus_LootAlertFrame.lua
│ │ ├── Sirus_Transmogrify.lua
│ │ ├── Sirus_LossOfControl.lua
│ │ ├── BGScore.lua
│ │ ├── Custom_MountChest.lua
│ │ ├── Sirus_Macro.lua
│ │ ├── Sirus_RaidManager.lua
│ │ ├── Sirus_ItemSocketing.lua
│ │ ├── Custom_Achievement.lua
│ │ ├── Misc.lua
│ │ ├── Sirus_TimeManager.lua
│ │ ├── Custom_Headhunting.lua
│ │ ├── Guild.lua
│ │ ├── Sirus_Collections.lua
│ │ ├── Spellbook.lua
│ │ ├── Sirus_Inspect.lua
│ │ ├── Custom_Roulette.lua
│ │ ├── WatchFrame.lua
│ │ ├── Help.lua
│ │ ├── Sirus_Trainer.lua
│ │ ├── Merchant.lua
│ │ └── Sirus_TradeSkill.lua
│ └── Skins.lua
├── Nameplates
│ ├── Load_Nameplates.xml
│ ├── Nameplates.lua
│ └── Elements
│ │ └── CastBar.lua
├── DataTexts
│ ├── Load_DataTexts.xml
│ ├── DataTexts.lua
│ ├── ArenaRating.lua
│ └── Friends.lua
└── Load_Modules.xml
├── Media
├── ChatLogos
│ ├── Vakh.tga
│ └── Dodzo.tga
└── Textures
│ └── BagNewItemGlow.tga
├── Settings
├── Global.lua
├── Filters
│ ├── Load_Filters.xml
│ ├── NamePlate.lua
│ └── UnitFrame.lua
├── Load_Config.xml
├── Private.lua
└── Profile.lua
├── Plugins
├── VisualProcs
│ ├── Load_VisualProcs.xml
│ └── Data.lua
├── Enhanced
│ ├── Load_Enhanced.xml
│ ├── MinimapButtonGrabber.lua
│ └── EquipmentInfo.lua
├── Load_Plugins.xml
└── AddOnSkins
│ ├── Load_AddOnSkins.xml
│ ├── Postal.lua
│ ├── MoveAnything.lua
│ ├── GnomishVendorShrinker.lua
│ └── Clique.lua
├── ElvUI_Sirus.toc
├── Fonts.lua
├── Init.lua
├── OptionsUI.lua
└── Libraries
└── LibDualSpec-1.0
└── LibDualSpec-1.0.lua
/ElvUI_Sirus/Modules/Bags/Load_Bags.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Chat/Load_Chat.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Media/ChatLogos/Vakh.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bunny67/ElvUI_Sirus/HEAD/ElvUI_Sirus/Media/ChatLogos/Vakh.tga
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Auras/Load_Auras.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Maps/Load_Maps.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Media/ChatLogos/Dodzo.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bunny67/ElvUI_Sirus/HEAD/ElvUI_Sirus/Media/ChatLogos/Dodzo.tga
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataBars/Load_DataBars.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Tooltip/Load_Tooltip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Global.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Blizzard/Load_Blizzard.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Misc/Load_Misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/UnitFrames/Units/Load_Units.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/VisualProcs/Load_VisualProcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/ActionBars/Load_ActionBars.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Media/Textures/BagNewItemGlow.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Bunny67/ElvUI_Sirus/HEAD/ElvUI_Sirus/Media/Textures/BagNewItemGlow.tga
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/UnitFrames/Elements/Load_Elements.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Filters/Load_Filters.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Load_Skins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Filters/NamePlate.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Nameplate Filter
3 |
4 | Add the nameplates name that you do NOT want to see.
5 | ]]
6 | local E, L, V, P, G = unpack(ElvUI)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Nameplates/Load_Nameplates.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/UnitFrames/Load_UnitFrames.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/Enhanced/Load_Enhanced.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataTexts/Load_DataTexts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Load_Config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/Load_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/AddOnSkins/Load_AddOnSkins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/UnitFrames/Units/Target.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local UF = E:GetModule("UnitFrames")
3 |
4 | local frame = ElvUF_Target
5 | if not frame then return end
6 |
7 | frame.HeadHuntingWantedFrame = UF:Construct_HeadHuntingWanted(frame)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_GMClient.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 |
9 | end
10 |
11 | S:AddCallback("Sirus_GMClient", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_GuildHouse.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 |
9 | end
10 |
11 | S:AddCallback("Sirus_GuildHouse", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_RaidFrame.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 |
9 | end
10 |
11 | S:AddCallback("Sirus_RaidFrame", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_BlackMarket.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 |
9 | end
10 |
11 | S:AddCallback("Sirus_BlackMarket", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_ArenaSpectator.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 |
9 | end
10 |
11 | S:AddCallback("Sirus_ArenaSpectator", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/VisualProcs/Data.lua:
--------------------------------------------------------------------------------
1 | if not LBP_Data then return end
2 |
3 | local tinsert = table.insert
4 |
5 | -- PALADIN
6 | -- 2 T5
7 | tinsert(LBP_Data.ButtonProcs.PALADIN[1], 307927)
8 |
9 | tinsert(SPELLOVERLAY_STORAGE, {nil, {307927}, {24239, 24274, 24275, 27180, 48805, 48806}})
10 |
11 | -- Test
12 | --[[
13 | tinsert(LBP_Data.ButtonProcs.PRIEST[1], 48168)
14 | LBP_Data.OverlayProcs.PRIEST[48168] = 3
15 | LBP_Data.OverlayTextures.PRIEST[3] = {10}
16 | ]]
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Blizzard/Blizzard.lua:
--------------------------------------------------------------------------------
1 | local items = {
2 | ["QuestInfoItem"] = MAX_NUM_ITEMS,
3 | ["QuestProgressItem"] = MAX_REQUIRED_ITEMS
4 | }
5 |
6 | QuestFrame:HookScript("OnShow", function(self)
7 | local frameLevel = self:GetFrameLevel()
8 |
9 | if QuestInfoItem1:GetFrameLevel() <= frameLevel or QuestProgressItem1:GetFrameLevel() <= frameLevel then
10 | for frame, numItems in pairs(items) do
11 | for i = 1, numItems do
12 | _G[frame..i]:SetFrameLevel(frameLevel + 5)
13 | end
14 | end
15 | end
16 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/ElvUI_Sirus.toc:
--------------------------------------------------------------------------------
1 | ## Interface: 30300
2 | ## Author: Bunny
3 | ## Version: 1.18
4 | ## Title: |cff1784d1E|r|cffe5e3e3lvUI|r |cff1784d1S|r|cffe5e3e3irus|r
5 | ## Notes: User Interface replacement AddOn for World of Warcraft.
6 | ## SavedVariables: ElvSirusDB
7 | ## RequiredDeps: ElvUI
8 | ## OptionalDeps: ElvUI_Enhanced, ElvUI_AddOnSkins, ElvUI_VisualProcs
9 |
10 | Libraries\LibDualSpec-1.0\LibDualSpec-1.0.lua
11 | Init.lua
12 | Fonts.lua
13 | Tags.lua
14 | Case.lua
15 | OptionsUI.lua
16 | Settings\Load_Config.xml
17 | Modules\Load_Modules.xml
18 | Plugins\Load_Plugins.xml
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Taxi.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.taxi ~= true then return end
9 |
10 | TaxiFrame:StripTextures()
11 | TaxiFrame:SetTemplate("Transparent")
12 | S:HandleCloseButton(TaxiFrame.CloseButton)
13 |
14 | TaxiRouteMap:CreateBackdrop()
15 | end
16 |
17 | S:RemoveCallback("Skin_Taxi")
18 | S:AddCallback("Skin_Taxi", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/Enhanced/MinimapButtonGrabber.lua:
--------------------------------------------------------------------------------
1 | if not IsAddOnLoaded("ElvUI_Enhanced") then return end
2 |
3 | local E, L, V, P, G = unpack(ElvUI)
4 | local MBG = E:GetModule("Enhanced_MinimapButtonGrabber")
5 |
6 | local ignoreButtons = {
7 | ["QueueStatusMinimapButton"] = true,
8 | }
9 |
10 | local old_SkinMinimapButton = MBG.SkinMinimapButton
11 | function MBG:SkinMinimapButton(button)
12 | if not button or button.isSkinned then return end
13 |
14 | local name = button:GetName()
15 | if not name then return end
16 |
17 | if button:IsObjectType("Button") and ignoreButtons[name] then
18 | return
19 | end
20 |
21 | return old_SkinMinimapButton(self, button)
22 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Load_Modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataTexts/DataTexts.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local mod = E:NewModule("Sirus_DataTexts")
3 | local DT = E:GetModule("DataTexts")
4 |
5 | local pairs = pairs
6 |
7 | function mod:GetPanelByDataTextName(name)
8 | for _, data in pairs(DT.RegisteredPanels) do
9 | for _, panelData in pairs(data.dataPanels) do
10 | if panelData.name == name then
11 | return panelData
12 | end
13 | end
14 | end
15 | end
16 |
17 | function mod:Initialize()
18 | self:HookFriens()
19 | self:HookGuild()
20 | end
21 |
22 | local function InitializeCallback()
23 | mod:Initialize()
24 | end
25 |
26 | E:RegisterModule(mod:GetName(), InitializeCallback)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Private.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 |
3 | --Locked Settings, These settings are stored for your character only regardless of profile options.
4 |
5 |
6 | --Skins
7 | V.skins.cleanExtraButton = false
8 |
9 | V.skins.blizzard.deathRecap = true
10 | V.skins.blizzard.guild = true
11 | V.skins.blizzard.losscontrol = true
12 | V.skins.blizzard.store = true
13 | V.skins.blizzard.timer = true
14 | V.skins.blizzard.transmogrify = true
15 | V.skins.blizzard.collections = true
16 | V.skins.blizzard.encounterjournal = true
17 | V.skins.blizzard.roulette = true
18 | V.skins.blizzard.mountChest = true
19 | V.skins.blizzard.extraButton = true
20 | V.skins.blizzard.headhunting = true
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Profile.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 |
3 | P.auras.buffs.filter = ""
4 | P.auras.debuffs.filter = ""
5 |
6 | P.actionbar.microbar.buttonsPerRow = 12
7 |
8 | P.chat.maxLines = 999
9 |
10 | P.databars.honor = {
11 | enable = true,
12 | width = 10,
13 | height = 180,
14 | textFormat = "NONE",
15 | textSize = 11,
16 | font = "PT Sans Narrow",
17 | fontOutline = "NONE",
18 | mouseover = false,
19 | orientation = "VERTICAL",
20 | hideInVehicle = false,
21 | hideInCombat = false
22 | }
23 |
24 | -- Sirus
25 | P.sirus = {
26 | case = true
27 | }
28 |
29 | P.datatexts.ArenaRating = {
30 | [1] = false,
31 | [2] = true,
32 | [3] = false,
33 | [4] = false,
34 | }
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/DressingRoom.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | local function LoadSkin()
5 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.dressingroom ~= true then return end
6 |
7 | S:HandlePortraitFrame(DressUpFrame)
8 |
9 | MaximizeMinimizeFrame:StripTextures(true)
10 | S:HandleMaxMinFrame(DressUpFrame.MaxMinButtonFrame)
11 |
12 | S:HandleButton(DressUpFrameCancelButton)
13 | S:HandleButton(DressUpFrameResetButton)
14 |
15 | DressUpModel:CreateBackdrop("Default")
16 |
17 | S:HandleControlFrame(DressUpModel.controlFrame)
18 | end
19 |
20 | S:RemoveCallback("Skin_DressingRoom")
21 | S:AddCallback("Skin_DressingRoom", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Custom_ExtraActionButton.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.extraButton ~= true then return end
9 |
10 | for i = 1, #ExtraActionBarFrame.ExtraButtons do
11 | local button = ExtraActionBarFrame.ExtraButtons[i]
12 | button:SetTemplate()
13 | button:StyleButton()
14 |
15 | button.icon:SetDrawLayer("BORDER")
16 | button.icon:SetInside()
17 | button.icon:SetTexCoord(unpack(E.TexCoords))
18 |
19 | button:SetNormalTexture("")
20 |
21 | if E.private.skins.cleanExtraButton then
22 | button.style:SetAlpha(0)
23 | else
24 | button.style:SetDrawLayer("BACKGROUND")
25 | end
26 |
27 | button.cooldown:SetInside()
28 | E:RegisterCooldown(button.cooldown)
29 | E:CreateCooldownTimer(button.cooldown)
30 | button.cooldown.timer:SetAlpha(1)
31 | end
32 | end
33 |
34 | S:AddCallback("Custom_ExtraActionButton", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_DeathRecap.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local unpack = unpack
6 | --WoW API / Variables
7 |
8 | local function LoadSkin()
9 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.deathRecap ~= true then return end
10 |
11 | DeathRecapFrame:StripTextures()
12 | S:HandleCloseButton(DeathRecapFrame.CloseXButton)
13 | S:HandleButton(DeathRecapFrame.CloseButton)
14 | S:HandleButton(DeathRecapFrame.HeadHuntingButton)
15 | DeathRecapFrame:SetTemplate("Transparent")
16 |
17 | for i = 1, 5 do
18 | local iconBorder = DeathRecapFrame["Recap"..i].SpellInfo.IconBorder
19 | local icon = DeathRecapFrame["Recap"..i].SpellInfo.Icon
20 | iconBorder:SetAlpha(0)
21 | icon:SetTexCoord(unpack(E.TexCoords))
22 | DeathRecapFrame["Recap"..i].SpellInfo:CreateBackdrop()
23 | DeathRecapFrame["Recap"..i].SpellInfo.backdrop:SetOutside(icon)
24 | icon:SetParent(DeathRecapFrame["Recap"..i].SpellInfo.backdrop)
25 | end
26 | end
27 |
28 | S:AddCallback("Sirus_DeathRecap", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Bags/Bags.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local B = E:GetModule("Bags")
3 |
4 | hooksecurefunc(B, "UpdateSlot", function(_, frame, bagID, slotID)
5 | if (frame.Bags[bagID] and frame.Bags[bagID].numSlots ~= GetContainerNumSlots(bagID)) or not frame.Bags[bagID] or not frame.Bags[bagID][slotID] then return end
6 |
7 | local slot = frame.Bags[bagID][slotID]
8 | local clink = GetContainerItemLink(bagID, slotID)
9 | local found
10 | if clink then
11 | for i = 1, 3 do
12 | local _, glink = GetItemGem(clink, i)
13 | if glink then
14 | local _, _, itemRarity = GetItemInfo(glink)
15 | if itemRarity == 5 then
16 | if not slot.bagNewItemGlow then
17 | slot.bagNewItemGlow = slot:CreateTexture(nil, "OVERLAY")
18 | slot.bagNewItemGlow:SetInside()
19 | slot.bagNewItemGlow:SetTexture([[Interface\AddOns\ElvUI_Sirus\Media\Textures\BagNewItemGlow]])
20 | slot.bagNewItemGlow:SetVertexColor(GetItemQualityColor(5))
21 | end
22 |
23 | slot.bagNewItemGlow:Show()
24 | found = true
25 | break
26 | end
27 | end
28 | end
29 | end
30 |
31 | if not found and slot.bagNewItemGlow then
32 | slot.bagNewItemGlow:Hide()
33 | end
34 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Timer.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local pairs = pairs
6 | --WoW API / Variables
7 |
8 | local function LoadSkin()
9 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.timer ~= true then return end
10 |
11 | local function Bar_OnValueChanged(self, value)
12 | local r, g, b = E:ColorGradient(value, 0,.65,0, .65,.65,0, .65,0,0)
13 | self:SetStatusBarColor(r, g, b)
14 | self.bg:SetVertexColor(r * 0.25, g * 0.25, b * 0.25)
15 | end
16 |
17 | hooksecurefunc("TimerTracker_OnEvent", function(self, event)
18 | if event == "START_TIMER" then
19 | for _, b in pairs(self.timerList) do
20 | if b.bar and not b.bar.isSkinned then
21 | b.bar:StripTextures()
22 | b.bar.timeText:FontTemplate(nil, 12, "OUTLINE")
23 |
24 | b.bar:SetStatusBarTexture(E.media.glossTex)
25 | E:RegisterStatusBar(b.bar)
26 | b.bar:CreateBackdrop()
27 |
28 | b.bar.bg = b.bar:CreateTexture("$parentBackgrund", "BORDER")
29 | b.bar.bg:SetAllPoints()
30 | b.bar.bg:SetTexture(E.media.blankTex)
31 |
32 | b.bar:HookScript("OnValueChanged", Bar_OnValueChanged)
33 |
34 | b.bar.isSkinned = true
35 | end
36 | end
37 | end
38 | end)
39 | end
40 |
41 | S:AddCallback("Sirus_Timer", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Load_Blizzard.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_LootAlertFrame.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.alertframes then return end
11 |
12 | for i = 1, 4 do
13 | local button = _G["LootAlertButton"..i]
14 | button:DisableDrawLayer("OVERLAY")
15 | button.Background:SetAlpha(0)
16 |
17 | button:CreateBackdrop("Transparent")
18 | button.backdrop:Point("TOPLEFT", 14, -15)
19 | button.backdrop:Point("BOTTOMRIGHT", -16, 11)
20 |
21 | local iconBackdrop = CreateFrame("Frame", nil, button)
22 | iconBackdrop:SetTemplate()
23 | button.Icon:SetTexCoord(unpack(E.TexCoords))
24 | button.Icon:SetParent(iconBackdrop)
25 | button.Count:SetParent(iconBackdrop)
26 | iconBackdrop:SetOutside(button.Icon)
27 |
28 | button.IconBorder:SetAlpha(0)
29 | hooksecurefunc(button.ItemName, "SetTextColor", function(_, r, g, b) iconBackdrop:SetBackdropBorderColor(r, g, b) end)
30 | end
31 |
32 | --[[
33 | function TestAlert()
34 | local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(100152)
35 |
36 | if link then
37 | LootAlertFrame:AddAlert(name, link, quality, texture, 5)
38 | end
39 | end
40 | ]]
41 | end
42 |
43 | S:AddCallback("Sirus_LootAlertFrame", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Transmogrify.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.transmogrify ~= true then return end
11 |
12 | S:HandlePortraitFrame(TransmogrifyFrame)
13 | S:HandleCloseButton(TransmogrifyFrameCloseButton)
14 | TransmogrifyFrameArt:StripTextures()
15 |
16 | S:HandleRotateButton(TransmogrifyModelFrameRotateLeftButton)
17 | S:HandleRotateButton(TransmogrifyModelFrameRotateRightButton)
18 | TransmogrifyModelFrameRotateRightButton:Point("TOPLEFT", TransmogrifyModelFrameRotateLeftButton, "TOPRIGHT", 5, 0)
19 |
20 | local slots = {
21 | "HeadSlot",
22 | "ShoulderSlot",
23 | "BackSlot",
24 | "ChestSlot",
25 | "WristSlot",
26 | "HandsSlot",
27 | "WaistSlot",
28 | "LegsSlot",
29 | "FeetSlot",
30 | "MainHandSlot",
31 | "SecondaryHandSlot",
32 | "RangedSlot"
33 | }
34 |
35 | for i, slot in pairs(slots) do
36 | local button = _G["TransmogrifyFrame"..slot]
37 | button:SetTemplate()
38 | button:StyleButton()
39 |
40 | button.icon:SetTexCoord(unpack(E.TexCoords))
41 | button.icon:SetInside()
42 | button.icon:SetDrawLayer("BORDER")
43 | button.altTexture:SetAlpha(0)
44 |
45 | _G["TransmogrifyFrame"..slot.."Border"]:SetAlpha(0)
46 | _G["TransmogrifyFrame"..slot.."Grabber"]:SetAlpha(0)
47 | end
48 |
49 | S:HandleButton(TransmogrifyApplyButton, true)
50 | TransmogrifyFrameButtonFrame:StripTextures()
51 | end
52 |
53 | S:AddCallback("Sirus_Transmogrify", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Chat/Chat.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local CH = E:GetModule("Chat")
3 |
4 | local ElvBlue = E:TextureString(E.Media.ChatLogos.ElvBlue, ":13:25")
5 | local Vakh = E:TextureString([[Interface\AddOns\ElvUI_Sirus\Media\ChatLogos\Vakh]], ":16:16")
6 | local Dodzo = E:TextureString([[Interface\AddOns\ElvUI_Sirus\Media\ChatLogos\Dodzo]], ":16:16")
7 | local specialChatIcons = {
8 | ["Крольчонок-Scourge x2 - 3.3.5a+"] = ElvBlue,
9 | ["Vakh-Scourge x2 - 3.3.5a+"] = Vakh,
10 | ["Язло-Scourge x2 - 3.3.5a+"] = Vakh,
11 | ["Додзё-Scourge x2 - 3.3.5a+"] = Dodzo,
12 | }
13 |
14 | local function GetChatIcon(_, name, realm)
15 | if not name then return end
16 |
17 | realm = realm ~= "" and realm or E.myrealm
18 | name = name.."-"..realm
19 |
20 | if specialChatIcons[name] then
21 | return specialChatIcons[name]
22 | end
23 | end
24 |
25 | CH:AddPluginIcons(GetChatIcon)
26 |
27 | hooksecurefunc(CH, "StyleChat", function(_, frame)
28 | frame.buttonFrame:Kill()
29 | frame.buttonFrame2:Hide()
30 | frame.buttonFrame2.Show = E.noop
31 | end)
32 |
33 | function ChatUrlHyperlink_OnClick(link, text)
34 | if IsModifiedClick() then
35 | HandleModifiedItemClick(text)
36 | return
37 | end
38 |
39 | local linkData = C_Split(link, ":")
40 | if linkData then
41 | local id, arg1, arg2, arg3 = unpack(linkData, 2)
42 |
43 | if linkData then
44 | if id and arg1 and arg2 and arg3 then
45 | C_SendOpcode(CMSG_SIRUS_OPEN_URL, tonumber(id), arg1, arg2, arg3)
46 | else
47 | local currentLink = strsub(link, 5)
48 | if currentLink and currentLink ~= "" then
49 | CH:SetChatEditBoxMessage(currentLink)
50 | end
51 | end
52 | end
53 | end
54 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Fonts.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 |
3 | --Lua functions
4 | --WoW API / Variables
5 |
6 | local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b)
7 | if not obj then return end
8 |
9 | obj:SetFont(font, size, style)
10 | if sr and sg and sb then obj:SetShadowColor(sr, sg, sb, sa) end
11 | if sox and soy then obj:SetShadowOffset(sox, soy) end
12 | if r and g and b then obj:SetTextColor(r, g, b)
13 | elseif r then obj:SetAlpha(r) end
14 | end
15 |
16 | hooksecurefunc(E, "UpdateBlizzardFonts", function(self)
17 | local NORMAL = self.media.normFont
18 | local MONOCHROME = ""
19 |
20 | if self.db.general.font == "Homespun" then
21 | MONOCHROME = "MONOCHROME"
22 | end
23 |
24 | if self.private.general.replaceBlizzFonts then
25 | SetFont(GameFontNormal9, NORMAL, self.db.general.fontSize)
26 | SetFont(GameFontNormal11, NORMAL, self.db.general.fontSize)
27 | SetFont(GameFontNormal12, NORMAL, self.db.general.fontSize)
28 | SetFont(GameFontNormal13, NORMAL, self.db.general.fontSize)
29 | SetFont(GameFontNormal14, NORMAL, self.db.general.fontSize*1.1)
30 | SetFont(GameFontNormal17, NORMAL, 18)
31 | SetFont(SystemFont_Med2, NORMAL, self.db.general.fontSize)
32 | SetFont(SystemFont_Outline, NORMAL, self.db.general.fontSize, MONOCHROME.."OUTLINE")
33 | SetFont(SystemFont_Shadow_Med1, NORMAL, self.db.general.fontSize)
34 | SetFont(SystemFont_Shadow_Med2, NORMAL, self.db.general.fontSize)
35 | SetFont(SystemFont_Shadow_Med3, NORMAL, self.db.general.fontSize*1.1)
36 | SetFont(QuestFont_Super_Huge, NORMAL, 22)
37 | SetFont(Fancy15Font, NORMAL, 16)
38 | SetFont(Fancy16Font, NORMAL, 16)
39 | SetFont(Fancy17Font, NORMAL, 18)
40 | SetFont(QuestFont15, NORMAL, 16)
41 | end
42 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_LossOfControl.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.losscontrol ~= true then return; end
9 |
10 | --/run LossOfControlFrame.fadeTime = 2000 LossOfControlFrame_SetUpDisplay(LossOfControlFrame, true, "CONFUSE", 2094, "Disoriented", [[Interface\Icons\Spell_Shadow_MindSteal]], 72101.9765625, 7.9950003623962, 8, 0, 5, 2)
11 | local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame)
12 | IconBackdrop:SetTemplate()
13 | IconBackdrop:SetOutside(LossOfControlFrame.Icon)
14 | IconBackdrop:SetFrameLevel(LossOfControlFrame:GetFrameLevel() - 1)
15 |
16 | LossOfControlFrame.Icon:SetTexCoord(.1, .9, .1, .9)
17 | LossOfControlFrame:StripTextures()
18 | LossOfControlFrame.AbilityName:ClearAllPoints()
19 | LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50)
20 |
21 | hooksecurefunc("LossOfControlFrame_SetUpDisplay", function(self)
22 | self.Icon:ClearAllPoints()
23 | self.Icon:Point("CENTER", self, "CENTER", 0, 0)
24 |
25 | self.AbilityName:ClearAllPoints()
26 | self.AbilityName:Point("BOTTOM", self, 0, -2)
27 | self.AbilityName.scrollTime = nil
28 | self.AbilityName:FontTemplate(E.media.normFont, 20, "OUTLINE")
29 |
30 | self.TimeLeft.NumberText:ClearAllPoints()
31 | self.TimeLeft.NumberText:Point("BOTTOM", self, 0, -22)
32 | self.TimeLeft.NumberText.scrollTime = nil
33 | self.TimeLeft.NumberText:FontTemplate(E.media.normFont, 20, "OUTLINE")
34 |
35 | self.TimeLeft.SecondsText:ClearAllPoints()
36 | self.TimeLeft.SecondsText:Point("BOTTOM", self, 0, -42)
37 | self.TimeLeft.SecondsText.scrollTime = nil
38 | self.TimeLeft.SecondsText:FontTemplate(E.media.normFont, 20, "OUTLINE")
39 | end)
40 | end
41 |
42 | S:AddCallback("Sirus_LossOfControl", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/UnitFrames/Elements/HeadHuntingWanted.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local UF = E:GetModule("UnitFrames")
3 |
4 | local ipairs = ipairs
5 | local tinsert = table.insert
6 |
7 | local frames = {}
8 |
9 | local event = CreateFrame("Frame")
10 | local HeadHuntingWantedFrameMixin = {}
11 | function HeadHuntingWantedFrameMixin:OnLoad()
12 | self:RegisterEventListener()
13 | end
14 | function HeadHuntingWantedFrameMixin:ASMSG_HEADHUNTING_IS_PLAYER_WANTED(msg)
15 | local wantedStorage = C_CacheInstance:Get("ASMSG_HEADHUNTING_IS_PLAYER_WANTED", {})
16 | local messageStorage = C_Split(msg, ",")
17 | local GUID = tonumber(messageStorage[E_HEADHUNTING_PLAYER_IS_WANTED.GUID])
18 | local isWanted = messageStorage[E_HEADHUNTING_PLAYER_IS_WANTED.ISWANTED] and tonumber(messageStorage[E_HEADHUNTING_PLAYER_IS_WANTED.ISWANTED])
19 |
20 | if not isWanted then
21 | return
22 | end
23 |
24 | wantedStorage[GUID] = isWanted == 1
25 |
26 | for _, frame in ipairs(frames) do
27 | UF:Update_HeadHuntingWanted(frame, true)
28 | end
29 | end
30 | Mixin(event, HeadHuntingWantedFrameMixin)
31 | event:OnLoad()
32 |
33 | local function PostUpdate(frame, e)
34 | if e == "OnShow" or e == "PLAYER_TARGET_CHANGED" then
35 | UF:Update_HeadHuntingWanted(frame)
36 | end
37 | end
38 |
39 | function UF:Construct_HeadHuntingWanted(frame)
40 | frame.PostUpdate = PostUpdate
41 |
42 | local wantedFrame = CreateFrame("PlayerModel", nil, frame.RaisedElementParent)
43 | wantedFrame:SetSize(100, 100)
44 | wantedFrame:SetPoint("CENTER", frame.Health)
45 |
46 | tinsert(frames, frame)
47 | return wantedFrame
48 | end
49 |
50 | function UF:Update_HeadHuntingWanted(frame, dontSendRequest)
51 | local isWanted
52 | if frame.unit and UnitExists(frame.unit) and UnitIsPlayer(frame.unit) then
53 | local guid = UnitGUID(frame.unit)
54 | if guid then
55 | local wantedStorage = C_CacheInstance:Get("ASMSG_HEADHUNTING_IS_PLAYER_WANTED", {})
56 | isWanted = wantedStorage[tonumber(guid)]
57 |
58 | if not dontSendRequest then
59 | SendServerMessage("ACMSG_HEADHUNTING_IS_PLAYER_WANTED", guid)
60 | end
61 | end
62 | end
63 |
64 | if isWanted then
65 | frame.HeadHuntingWantedFrame:Show()
66 | frame.HeadHuntingWantedFrame:SetModel("SPELLS\\HuntersMark_Impact_Chest.m2")
67 | frame.HeadHuntingWantedFrame:SetPosition(3, 0, 1.3)
68 | else
69 | frame.HeadHuntingWantedFrame:Hide()
70 | end
71 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/BGScore.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.bgscore ~= true then return; end
9 |
10 | WorldStateScoreFrame:StripTextures()
11 | WorldStateScoreFrame:SetTemplate("Transparent")
12 |
13 | BattlegroundBalanceProgressBar:CreateBackdrop()
14 | BattlegroundBalanceProgressBar.backdrop:SetOutside(BattlegroundBalanceProgressBar.Alliance, nil, nil, BattlegroundBalanceProgressBar.Horde)
15 | BattlegroundBalanceProgressBar.Border:SetAlpha(0)
16 |
17 | WorldStateScoreFrame.Container.FactionGlow:SetPoint("TOPLEFT", 1, 12)
18 | WorldStateScoreFrame.Container.Separator:SetAlpha(0)
19 | WorldStateScoreFrame.Container.Bg:SetAlpha(0)
20 | WorldStateScoreFrame.Container.TopRightCorner:SetAlpha(0)
21 | WorldStateScoreFrame.Container.TopLeftCorner:SetAlpha(0)
22 | WorldStateScoreFrame.Container.TopBorder:SetAlpha(0)
23 | WorldStateScoreFrame.Container.BotLeftCorner:SetAlpha(0)
24 | WorldStateScoreFrame.Container.BotRightCorner:SetAlpha(0)
25 | WorldStateScoreFrame.Container.BottomBorder:SetAlpha(0)
26 | WorldStateScoreFrame.Container.LeftBorder:SetAlpha(0)
27 | WorldStateScoreFrame.Container.RightBorder:SetAlpha(0)
28 | WorldStateScoreFrame.Container.Inset:StripTextures()
29 |
30 | WorldStateScoreScrollFrame:StripTextures()
31 | S:HandleScrollBar(WorldStateScoreScrollFrameScrollBar)
32 |
33 | S:HandleCloseButton(WorldStateScoreFrameCloseButton)
34 |
35 | for i = 1, 3 do
36 | S:HandleTab(_G["WorldStateScoreFrameTab"..i])
37 | end
38 |
39 | S:HandleButton(WorldStateScoreFrameLeaveButton)
40 |
41 | WorldStateScoreFrame.EfficiencyFrame.EfficiencyBar:CreateBackdrop()
42 | WorldStateScoreFrame.EfficiencyFrame.EfficiencyBar:SetStatusBarTexture(E.media.normTex)
43 | E:RegisterStatusBar(WorldStateScoreFrame.EfficiencyFrame.EfficiencyBar)
44 | WorldStateScoreFrame.EfficiencyFrame.EfficiencyBar.Border:SetAlpha(0)
45 |
46 | WorldStateScoreFrame.EfficiencyFrame.EfficiencyBar:HookScript("OnValueChanged", function(self, value)
47 | local r, g, b = E:ColorGradient(value, .65,0,0, .65,.65,0, 0,.65,0)
48 | self:SetStatusBarColor(r, g, b)
49 | self.Background:SetTexture(r * 0.25, g * 0.25, b * 0.25)
50 | end)
51 | end
52 |
53 | S:RemoveCallback("Skin_WorldStateScore")
54 | S:AddCallback("Skin_WorldStateScore", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Custom_MountChest.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.mountChest ~= true then return end
9 |
10 | --Custom_MountChestFrame:SetParent(UIParent)
11 | Custom_MountChestFrame:SetScale(E.mult * UIParent:GetScale())
12 |
13 | Custom_MountChestFrame:StripTextures()
14 | Custom_MountChestFrame:SetTemplate("Transparent")
15 |
16 | S:HandleCloseButton(Custom_MountChestFrame.closeButton)
17 |
18 | Custom_MountChestFrame.HeaderFrame:SetPoint("TOP", 0, 6)
19 | Custom_MountChestFrame.HeaderFrame.Background:Hide()
20 | Custom_MountChestFrame.HeaderFrame.TitleText:FontTemplate(nil, 18, "NONE")
21 |
22 | S:HandleButton(Custom_MountChestFrame.TakeButton)
23 |
24 | hooksecurefunc(Custom_MountChestFrame, "Reset", function(self, animationStage)
25 | for pi, card in pairs(self.cards) do
26 | if not card.isSkinned then
27 | card.Background:SetAlpha(0)
28 |
29 | card.NameFrame.Background:SetTexture(E.Media.Textures.Highlight)
30 | card.NameFrame.Background:SetAlpha(0.3)
31 |
32 | card.ArtFrame.Border:SetAlpha(0)
33 |
34 | card.NameArtFrame:SetHeight(36)
35 | card.NameArtFrame.Background:SetTexture(E.Media.Textures.Highlight)
36 | card.NameArtFrame.Background:SetTexCoord(1, 0, 1, 0)
37 | card.NameArtFrame.Background:SetAlpha(0.5)
38 | card.NameArtFrame.Name:SetTextColor(1, 1, 1)
39 | card.NameArtFrame.Name:SetPoint("CENTER")
40 |
41 | card.isSkinned = true
42 | end
43 |
44 | card:SetTemplate("Transparent")
45 |
46 | local mountData = LOTTERY_MOUNT_CHEST[pi]
47 | if mountData then
48 | local _, _, quality = GetItemInfo(mountData[E_LOTTERY_MOUNT_CHEST.ITEM_ID])
49 | if quality then
50 | card:SetBackdropBorderColor(GetItemQualityColor(quality))
51 | else
52 | card:SetBackdropBorderColor(unpack(E.media.bordercolor))
53 | end
54 | end
55 | end
56 | end)
57 |
58 | hooksecurefunc(Custom_MountChestFrame, "SetAnimationStage", function(self, animationStage)
59 | if animationStage == 4 then
60 | local winnerID = self:GetWinnerID()
61 | if not winnerID then return end
62 |
63 | local card = self.cards[winnerID]
64 | card:SetTemplate("NoBackdrop")
65 | end
66 | end)
67 | end
68 |
69 | S:AddCallback("Custom_MountChest", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Macro.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.macro ~= true then return end
11 |
12 | S:HandlePortraitFrame(MacroFrame)
13 | MacroFrameInset:StripTextures()
14 | MacroFrame.Art:StripTextures()
15 |
16 | S:HandleScrollBar(MacroButtonScrollFrameScrollBar)
17 | S:HandleScrollBar(MacroFrameScrollFrameScrollBar)
18 | S:HandleScrollBar(MacroPopupScrollFrameScrollBar)
19 |
20 | local Buttons = { "MacroFrameTab1", "MacroFrameTab2", "MacroDeleteButton", "MacroNewButton", "MacroExitButton", "MacroEditButton", "MacroPopupOkayButton", "MacroPopupCancelButton" }
21 | for i = 1, #Buttons do
22 | _G[Buttons[i]]:StripTextures()
23 | S:HandleButton(_G[Buttons[i]])
24 | end
25 |
26 | for i = 1, 2 do
27 | local tab = _G["MacroFrameTab"..i]
28 | tab:Height(22)
29 | end
30 |
31 | MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0)
32 |
33 | MacroFrameTextBackground:StripTextures()
34 | MacroFrameTextBackground:CreateBackdrop("Default")
35 | MacroFrameTextBackground.backdrop:Point("TOPLEFT", 6, -3)
36 | MacroFrameTextBackground.backdrop:Point("BOTTOMRIGHT", -2, 3)
37 |
38 | MacroButtonScrollFrame:StripTextures()
39 | MacroButtonScrollFrame:CreateBackdrop()
40 |
41 | S:HandleScrollBar(MacroButtonScrollFrame)
42 |
43 | MacroEditButton:ClearAllPoints()
44 | MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0)
45 |
46 | MacroFrameSelectedMacroButton:StripTextures()
47 | MacroFrameSelectedMacroButton:StyleButton(nil, true)
48 | MacroFrameSelectedMacroButton:GetNormalTexture():SetTexture(nil)
49 | MacroFrameSelectedMacroButton:SetTemplate("Default")
50 | MacroFrameSelectedMacroButtonIcon:SetTexCoord(unpack(E.TexCoords))
51 | MacroFrameSelectedMacroButtonIcon:SetInside()
52 |
53 | for i = 1, MAX_ACCOUNT_MACROS do
54 | local Button = _G["MacroButton"..i]
55 | local ButtonIcon = _G["MacroButton"..i.."Icon"]
56 |
57 | if Button then
58 | Button:StripTextures()
59 | Button:StyleButton(nil, true)
60 |
61 | Button:SetTemplate("Default", true)
62 | end
63 |
64 | if ButtonIcon then
65 | ButtonIcon:SetTexCoord(unpack(E.TexCoords))
66 | ButtonIcon:SetInside()
67 | end
68 | end
69 |
70 | S:HandleIconSelectionFrame(MacroPopupFrame, NUM_MACRO_ICONS_SHOWN, "MacroPopupButton", "MacroPopup")
71 | MacroPopupFrame.BorderBox:StripTextures()
72 | S:HandleEditBox(MacroPopupSearchBox)
73 | end
74 |
75 | S:AddCallback("Sirus_Macro", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Misc/RaidBuffReminder.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local RB = E:GetModule("ReminderBuffs")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | RB.Spell1Buffs = {
8 | 67016, -- Flask of the North (SP)
9 | 67017, -- Flask of the North (AP)
10 | 67018, -- Flask of the North (STR)
11 | 53755, -- Flask of the Frost Wyrm
12 | 53758, -- Flask of Stoneblood
13 | 53760, -- Flask of Endless Rage
14 | 54212, -- Flask of Pure Mojo
15 | 53752, -- Lesser Flask of Toughness (50 Resilience)
16 | 17627, -- Flask of Distilled Wisdom
17 | 270006, -- Настой сопротивления
18 | 270007, -- Настой Драконьего разума
19 | 270008, -- Настой Сила титана
20 | 270009, -- Настой Текущей воды
21 | 270010, -- Настой Стальной Кожи
22 | 270011, -- Настой Крепости
23 |
24 | 33721, -- Spellpower Elixir
25 | 53746, -- Wrath Elixir
26 | 28497, -- Elixir of Mighty Agility
27 | 53748, -- Elixir of Mighty Strength
28 | 60346, -- Elixir of Lightning Speed
29 | 60344, -- Elixir of Expertise
30 | 60341, -- Elixir of Deadly Strikes
31 | 60345, -- Elixir of Armor Piercing
32 | 60340, -- Elixir of Accuracy
33 | 53749, -- Guru's Elixir
34 |
35 | 60343, -- Elixir of Mighty Defense
36 | 53751, -- Elixir of Mighty Fortitude
37 | 53764, -- Elixir of Mighty Mageblood
38 | 60347, -- Elixir of Mighty Thoughts
39 | 53763, -- Elixir of Protection
40 | 53747, -- Elixir of Spirit
41 | }
42 |
43 | RB.Spell2Buffs = {
44 | 57325, -- 80 AP
45 | 57327, -- 46 SP
46 | 57329, -- 40 Critical Strike Rating
47 | 57332, -- 40 Haste Rating
48 | 57334, -- 20 MP5
49 | 57356, -- 40 Expertise Rating
50 | 57358, -- 40 ARP
51 | 57360, -- 40 Hit Rating
52 | 57363, -- Tracking Humanoids
53 | 57365, -- 40 Spirit
54 | 57367, -- 40 AGI
55 | 57371, -- 40 STR
56 | 57373, -- Tracking Beasts
57 | 57399, -- 80 AP, 46 SP
58 | 59230, -- 40 Dodge Rating
59 | 65247, -- 20 STR
60 | }
61 |
62 | RB.Spell3Buffs = {
63 | 72588, -- Gift of the Wild
64 | 48469, -- Mark of the Wild
65 | }
66 |
67 | RB.Spell4Buffs = {
68 | 25898, -- Greater Blessing of Kings
69 | 20217, -- Blessing of Kings
70 | 72586, -- Blessing of Forgotten Kings
71 | }
72 |
73 | RB.CasterSpell5Buffs = {
74 | 61316, -- Dalaran Brilliance
75 | 43002, -- Arcane Brilliance
76 | 42995, -- Arcane Intellect
77 | }
78 |
79 | RB.MeleeSpell5Buffs = {
80 | 48162, -- Prayer of Fortitude
81 | 48161, -- Power Word: Fortitude
82 | 72590, -- Fortitude
83 | }
84 |
85 | RB.CasterSpell6Buffs = {
86 | 48938, -- Greater Blessing of Wisdom
87 | 48936, -- Blessing of Wisdom
88 | 58777, -- Mana Spring
89 | }
90 |
91 | RB.MeleeSpell6Buffs = {
92 | 48934, -- Greater Blessing of Might
93 | 48932, -- Blessing of Might
94 | 47436, -- Battle Shout
95 | }
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/Enhanced/EquipmentInfo.lua:
--------------------------------------------------------------------------------
1 | if not IsAddOnLoaded("ElvUI_Enhanced") then return end
2 |
3 | local E, L, V, P, G = unpack(ElvUI)
4 | local EI = E:GetModule("Enhanced_EquipmentInfo")
5 |
6 | local _G = _G
7 | local format = string.format
8 | local pairs = pairs
9 |
10 | local slots = {
11 | ["HeadSlot"] = true,
12 | ["NeckSlot"] = false,
13 | ["ShoulderSlot"] = true,
14 | ["BackSlot"] = false,
15 | ["ChestSlot"] = true,
16 | -- ["ShirtSlot"] = false,
17 | -- ["TabardSlot"] = false,
18 | ["WristSlot"] = true,
19 | ["HandsSlot"] = true,
20 | ["WaistSlot"] = true,
21 | ["LegsSlot"] = true,
22 | ["FeetSlot"] = true,
23 | ["Finger0Slot"] = false,
24 | ["Finger1Slot"] = false,
25 | ["Trinket0Slot"] = false,
26 | ["Trinket1Slot"] = false,
27 | ["MainHandSlot"] = true,
28 | ["SecondaryHandSlot"] = true,
29 | ["RangedSlot"] = true,
30 | -- ["AmmoSlot"] = false,
31 | }
32 |
33 | function EI:UpdatePaperDoll(unit)
34 | if not self.initialized then return end
35 |
36 | if unit == "player" and InCombatLockdown() then
37 | self:RegisterEvent("PLAYER_REGEN_ENABLED", "OnEvent")
38 | return
39 | elseif unit ~= "player" then
40 | if InspectFrame then
41 | unit = InspectFrame.unit
42 |
43 | if not unit then return end
44 | else
45 | return
46 | end
47 | end
48 |
49 | local baseName = unit == "player" and "Character" or "Inspect"
50 | local frame, slotID, itemLink
51 | local _, rarity, itemLevel
52 | local current, maximum, r, g, b
53 |
54 | for slotName, durability in pairs(slots) do
55 | frame = _G[format("%s%s", baseName, slotName)]
56 |
57 | if frame then
58 | slotID = GetInventorySlotInfo(slotName)
59 |
60 | frame.ItemLevel:SetText()
61 |
62 | if E.db.enhanced.equipment.itemlevel.enable then
63 | itemLink = GetInventoryItemLink(unit, slotID)
64 |
65 | if itemLink then
66 | _, _, rarity, itemLevel = GetItemInfo(itemLink)
67 |
68 | if itemLevel then
69 | frame.ItemLevel:SetText(itemLevel)
70 |
71 | if E.db.enhanced.equipment.itemlevel.qualityColor then
72 | frame.ItemLevel:SetTextColor()
73 | if rarity and rarity > 1 then
74 | frame.ItemLevel:SetTextColor(GetItemQualityColor(rarity))
75 | else
76 | frame.ItemLevel:SetTextColor(1, 1, 1)
77 | end
78 | else
79 | frame.ItemLevel:SetTextColor(1, 1, 1)
80 | end
81 | end
82 | end
83 | end
84 |
85 | if unit == "player" and durability then
86 | frame.DurabilityInfo:SetText()
87 |
88 | if E.db.enhanced.equipment.durability.enable then
89 | current, maximum = GetInventoryItemDurability(slotID)
90 |
91 | if current and maximum and (not E.db.enhanced.equipment.durability.onlydamaged or current < maximum) then
92 | r, g, b = E:ColorGradient((current / maximum), 1, 0, 0, 1, 1, 0, 0, 1, 0)
93 | frame.DurabilityInfo:SetFormattedText("%s%.0f%%|r", E:RGBToHex(r, g, b), (current / maximum) * 100)
94 | end
95 | end
96 | end
97 | end
98 | end
99 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Nameplates/Nameplates.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local NP = E:GetModule("NamePlates")
3 |
4 | local plateID = 0
5 | function NP:OnCreated(frame)
6 | plateID = plateID + 1
7 | local Health, CastBar = frame:GetChildren()
8 | local Threat, Border, CastBarBorder, CastBarShield, CastBarIcon, Highlight, Name, Level, BossIcon, RaidIcon, EliteIcon = frame:GetRegions()
9 |
10 | local unitFrame = CreateFrame("Frame", format("ElvUI_NamePlate%d", plateID), frame)
11 | frame.UnitFrame = unitFrame
12 | unitFrame:Hide()
13 | unitFrame:SetAllPoints()
14 | unitFrame.plateID = plateID
15 |
16 | unitFrame.Health = self:Construct_HealthBar(unitFrame)
17 | unitFrame.Health.Highlight = self:Construct_Highlight(unitFrame)
18 | unitFrame.CutawayHealth = self:ConstructElement_CutawayHealth(unitFrame)
19 | unitFrame.Level = self:Construct_Level(unitFrame)
20 | unitFrame.Name = self:Construct_Name(unitFrame)
21 | unitFrame.CastBar = self:Construct_CastBar(unitFrame)
22 | unitFrame.Elite = self:Construct_Elite(unitFrame)
23 | unitFrame.Buffs = self:ConstructElement_Auras(unitFrame, "Buffs")
24 | unitFrame.Debuffs = self:ConstructElement_Auras(unitFrame, "Debuffs")
25 | unitFrame.HealerIcon = self:Construct_HealerIcon(unitFrame)
26 | unitFrame.CPoints = self:Construct_CPoints(unitFrame)
27 | unitFrame.IconFrame = self:Construct_IconFrame(unitFrame)
28 | self:Construct_Glow(unitFrame)
29 |
30 | self:QueueObject(Health)
31 | self:QueueObject(CastBar)
32 | self:QueueObject(Level)
33 | self:QueueObject(Name)
34 | self:QueueObject(Threat)
35 | self:QueueObject(Border)
36 | self:QueueObject(CastBarBorder)
37 | self:QueueObject(CastBarShield)
38 | self:QueueObject(Highlight)
39 | CastBarIcon:SetParent(E.HiddenFrame)
40 | BossIcon:SetAlpha(0)
41 | EliteIcon:SetAlpha(0)
42 |
43 | unitFrame.oldHealthBar = Health
44 | unitFrame.oldCastBar = CastBar
45 | unitFrame.oldCastBar.Shield = CastBarShield
46 | unitFrame.oldCastBar.Icon = CastBarIcon
47 | unitFrame.oldName = Name
48 | unitFrame.oldHighlight = Highlight
49 | unitFrame.oldLevel = Level
50 |
51 | unitFrame.Threat = Threat
52 | RaidIcon:SetParent(unitFrame)
53 | unitFrame.RaidIcon = RaidIcon
54 |
55 | unitFrame.BossIcon = BossIcon
56 | unitFrame.EliteIcon = EliteIcon
57 |
58 | self.OnShow(frame, true)
59 | self:SetSize(frame)
60 |
61 | frame:HookScript("OnShow", self.OnShow)
62 | frame:HookScript("OnHide", self.OnHide)
63 | Health:HookScript("OnValueChanged", self.Update_HealthOnValueChanged)
64 | CastBar:HookScript("OnShow", self.UpdateElement_CastBarOnShow)
65 | CastBar:HookScript("OnHide", self.UpdateElement_CastBarOnHide)
66 | CastBar:HookScript("OnValueChanged", self.UpdateElement_CastBarOnValueChanged)
67 |
68 | self.CreatedPlates[frame] = true
69 | self.VisiblePlates[unitFrame] = 1
70 | end
71 |
72 | NP.OnEvent = E.noop
73 | NP.RegisterEvents = E.noop
74 | NP.UnregisterAllEvents = E.noop
75 |
76 | function NP:UpdateCVars()
77 | SetCVar("ShowClassColorInNameplate", "1")
78 | SetCVar("showVKeyCastbar", "1")
79 | SetCVar("nameplateAllowOverlap", self.db.motionType == "STACKED" and "0" or "1")
80 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_RaidManager.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true then return end
9 |
10 | local frameManager = CompactRaidFrameManager
11 | local displayFrame = frameManager.displayFrame
12 |
13 | frameManager:StripTextures()
14 | frameManager:CreateBackdrop("Transparent")
15 | frameManager.backdrop:Point("TOPLEFT", 1, -1)
16 | frameManager.backdrop:Point("BOTTOMRIGHT", -11, 1)
17 |
18 | S:HandleButton(frameManager.toggleButton)
19 | frameManager.toggleButton:ClearAllPoints()
20 | frameManager.toggleButton:Width(10)
21 | frameManager.toggleButton:Point("RIGHT", -7, 0)
22 |
23 | frameManager.toggleButton.Icon = frameManager.toggleButton:CreateTexture()
24 | frameManager.toggleButton.Icon:Size(16)
25 | frameManager.toggleButton.Icon:SetPoint("CENTER")
26 | frameManager.toggleButton.Icon:SetTexture(E.Media.Textures.ArrowUp)
27 | frameManager.toggleButton.Icon:SetRotation(S.ArrowRotation.right)
28 |
29 | hooksecurefunc(frameManager.toggleButton:GetNormalTexture(), "SetTexCoord", function(_, a, b)
30 | if a > 0 then
31 | frameManager.toggleButton.Icon:SetRotation(S.ArrowRotation.left)
32 | elseif b < 1 then
33 | frameManager.toggleButton.Icon:SetRotation(S.ArrowRotation.right)
34 | end
35 | end)
36 |
37 | S:HandleButton(frameManager.resizer)
38 | frameManager.resizer:Size(64, 10)
39 | frameManager.resizer:Point("BOTTOM", 0, -3)
40 |
41 | frameManager.resizer.UpIcon = frameManager.resizer:CreateTexture()
42 | frameManager.resizer.UpIcon:Size(16)
43 | frameManager.resizer.UpIcon:SetPoint("LEFT", 12, 0)
44 | frameManager.resizer.UpIcon:SetTexture(E.Media.Textures.ArrowUp)
45 | frameManager.resizer.UpIcon:SetRotation(S.ArrowRotation.up)
46 |
47 | frameManager.resizer.DownIcon = frameManager.resizer:CreateTexture()
48 | frameManager.resizer.DownIcon:Size(16)
49 | frameManager.resizer.DownIcon:SetPoint("RIGHT", -12, 0)
50 | frameManager.resizer.DownIcon:SetTexture(E.Media.Textures.ArrowUp)
51 | frameManager.resizer.DownIcon:SetRotation(S.ArrowRotation.down)
52 |
53 | displayFrame:StripTextures()
54 |
55 | displayFrame.memberCountLabel:SetPoint("TOPRIGHT", -18, -8)
56 |
57 | for i = 1, 8 do
58 | _G["CompactRaidFrameManagerDisplayFrameRaidMarkersRaidMarker"..i]:SetNormalTexture(E.Media.Textures.RaidIcons)
59 | end
60 |
61 | displayFrame.convertToRaid:StripTextures(nil, true)
62 | S:HandleButton(displayFrame.convertToRaid, true)
63 |
64 | displayFrame.readyCheckButton:StripTextures(nil, true)
65 | S:HandleButton(displayFrame.readyCheckButton)
66 |
67 | displayFrame.RaidWorldMarkerButton:StripTextures(nil, true)
68 | S:HandleButton(displayFrame.RaidWorldMarkerButton)
69 | displayFrame.RaidWorldMarkerButton:Width(39)
70 | displayFrame.RaidWorldMarkerButton:Point("TOPLEFT", displayFrame.readyCheckButton, "TOPRIGHT", 2, 0)
71 | displayFrame.RaidWorldMarkerButton:SetNormalTexture("Interface\\RaidFrame\\Raid-WorldPing")
72 | end
73 |
74 | S:AddCallback("Skin_RaidManager", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_ItemSocketing.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins");
3 |
4 | --Lua functions
5 | local _G = _G
6 | --WoW API / Variables
7 | local GetNumSockets = GetNumSockets
8 | local GetSocketTypes = GetSocketTypes
9 |
10 | local function LoadSkin()
11 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.socket then return end
12 |
13 | ITEM_SOCKETING_DESCRIPTION_MIN_WIDTH = 278
14 |
15 | ItemSocketingFrame:StripTextures()
16 | ItemSocketingFrame:CreateBackdrop("Transparent")
17 | ItemSocketingFrame.backdrop:Point("TOPLEFT", 11, -12)
18 | ItemSocketingFrame.backdrop:Point("BOTTOMRIGHT", -2, 31)
19 |
20 | S:SetUIPanelWindowInfo(ItemSocketingFrame, "width")
21 | S:SetBackdropHitRect(ItemSocketingFrame)
22 |
23 | ItemSocketingFramePortrait:Kill()
24 |
25 | S:HandleCloseButton(ItemSocketingCloseButton, ItemSocketingFrame.backdrop)
26 |
27 | ItemSocketingScrollFrame:Height(269)
28 | ItemSocketingScrollFrame:Point("TOPLEFT", 20, -77)
29 | ItemSocketingScrollFrame:StripTextures()
30 | ItemSocketingScrollFrame:CreateBackdrop("Transparent")
31 | ItemSocketingScrollFrame.backdrop:Point("BOTTOMRIGHT", 3, -2)
32 |
33 | S:HandleScrollBar(ItemSocketingScrollFrameScrollBar, 2)
34 |
35 | ItemSocketingScrollFrameScrollBar:Point("TOPLEFT", ItemSocketingScrollFrame, "TOPRIGHT", 7, -18)
36 | ItemSocketingScrollFrameScrollBar:Point("BOTTOMLEFT", ItemSocketingScrollFrame, "BOTTOMRIGHT", 7, 19)
37 |
38 | S:HandleButton(ItemSocketingSocketButton)
39 | ItemSocketingSocketButton:Point("BOTTOMRIGHT", -10, 39)
40 |
41 | for i = 1, MAX_NUM_SOCKETS do
42 | local button = _G["ItemSocketingSocket"..i]
43 | local bracket = _G["ItemSocketingSocket"..i.."BracketFrame"]
44 | local bg = _G["ItemSocketingSocket"..i.."Background"]
45 | local icon = _G["ItemSocketingSocket"..i.."IconTexture"]
46 | local shine = _G["ItemSocketingSocket"..i.."Shine"]
47 |
48 | button:StripTextures()
49 | button:StyleButton(false)
50 | button:SetTemplate("Default", true)
51 |
52 | bracket:Kill()
53 | bg:Kill()
54 |
55 | icon:SetTexCoord(unpack(E.TexCoords))
56 | icon:SetInside()
57 |
58 | shine:Point("CENTER")
59 | shine:Size(40)
60 | end
61 |
62 | local GEM_TYPE_INFO = GEM_TYPE_INFO
63 |
64 | hooksecurefunc("ItemSocketingFrame_Update", function()
65 | local numSockets = GetNumSockets()
66 |
67 | for i = 1, numSockets do
68 | local button = _G["ItemSocketingSocket"..i]
69 | local color = GEM_TYPE_INFO[GetSocketTypes(i)]
70 | button:SetBackdropColor(color.r, color.g, color.b, 0.15)
71 | button:SetBackdropBorderColor(color.r, color.g, color.b)
72 | end
73 |
74 | if numSockets == 3 then
75 | ItemSocketingSocket1:SetPoint("BOTTOM", -80, 70)
76 | elseif numSockets == 2 then
77 | ItemSocketingSocket1:SetPoint("BOTTOM", -36, 70)
78 | else
79 | ItemSocketingSocket1:SetPoint("BOTTOM", 0, 70)
80 | end
81 | end)
82 |
83 | hooksecurefunc(ItemSocketingScrollFrame, "SetWidth", function(self, width)
84 | if width == 269 then
85 | self:Width(300)
86 | elseif width == 297 then
87 | self:Width(321)
88 | end
89 | end)
90 | end
91 |
92 | S:AddCallback("Sirus_ItemSocketing", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/AddOnSkins/Postal.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI)
2 | local AS = E:GetModule("AddOnSkins", true)
3 | if not AS then return end
4 |
5 | if not AS:IsAddonLODorEnabled("Postal") then return end
6 |
7 | local S = E:GetModule("Skins")
8 |
9 | S:RemoveCallbackForAddon("Postal", "Postal")
10 | S:AddCallbackForAddon("Postal", "Postal", function()
11 | if not E.private.addOnSkins.Postal then return end
12 |
13 | for i = 1, INBOXITEMS_TO_DISPLAY do
14 | local mail = _G["MailItem"..i]
15 | local button = _G["MailItem"..i.."Button"]
16 | local expire = _G["MailItem"..i.."ExpireTime"]
17 | local inboxCB = _G["PostalInboxCB"..i]
18 |
19 | button:SetScale(1)
20 | mail:Size(302, 45)
21 |
22 | if i == 1 then
23 | mail:Point("TOPLEFT", 25, -8)
24 | elseif i == 7 then
25 | mail:Point("TOPLEFT", InboxFrameRightContainer, 22, -8)
26 | end
27 |
28 | if expire then
29 | expire:Point("TOPRIGHT", -4, -2)
30 |
31 | if expire.returnicon then
32 | expire.returnicon:StripTextures(true)
33 | S:HandleCloseButton(expire.returnicon)
34 | expire.returnicon:SetHitRectInsets(0, 0, 0, 0)
35 | expire.returnicon:ClearAllPoints()
36 | expire.returnicon:Point("BOTTOMRIGHT", mail, -4, 2)
37 | expire.returnicon:Size(16)
38 | end
39 | end
40 |
41 | if inboxCB then
42 | S:HandleCheckBox(inboxCB)
43 | inboxCB:ClearAllPoints()
44 | inboxCB:Point("RIGHT", mail, "LEFT", -2, 0)
45 | end
46 | end
47 |
48 | if PostalSelectOpenButton then
49 | S:HandleButton(PostalSelectOpenButton, true)
50 | PostalSelectOpenButton:ClearAllPoints()
51 | PostalSelectOpenButton:Point("TOPLEFT", InboxFrame, "TOPLEFT", 21, 28)
52 | end
53 |
54 | if PostalSelectReturnButton then
55 | S:HandleButton(PostalSelectReturnButton, true)
56 | PostalSelectReturnButton:ClearAllPoints()
57 | PostalSelectReturnButton:Point("LEFT", PostalSelectOpenButton, "RIGHT", 77, 0)
58 | end
59 |
60 | if Postal_OpenAllMenuButton then
61 | S:HandleNextPrevButton(Postal_OpenAllMenuButton)
62 | Postal_OpenAllMenuButton:ClearAllPoints()
63 | Postal_OpenAllMenuButton:Point("LEFT", PostalOpenAllButton, "RIGHT", 2, 0)
64 | Postal_OpenAllMenuButton:Size(25)
65 | end
66 |
67 | if PostalOpenAllButton then
68 | S:HandleButton(PostalOpenAllButton, true)
69 | end
70 |
71 | if Postal_ModuleMenuButton then
72 | S:HandleNextPrevButton(Postal_ModuleMenuButton, nil, nil, true)
73 | Postal_ModuleMenuButton:Point("TOPRIGHT", MailFrame, -20, 2)
74 | Postal_ModuleMenuButton:Size(25)
75 | end
76 |
77 | if Postal_BlackBookButton then
78 | S:HandleNextPrevButton(Postal_BlackBookButton)
79 | Postal_BlackBookButton:ClearAllPoints()
80 | Postal_BlackBookButton:Point("LEFT", SendMailNameEditBox, "RIGHT", 2, 0)
81 | Postal_BlackBookButton:Size(20)
82 | end
83 |
84 | hooksecurefunc(Postal, "CreateAboutFrame", function()
85 | if PostalAboutFrame then
86 | PostalAboutFrame:StripTextures()
87 | PostalAboutFrame:SetTemplate("Transparent")
88 |
89 | if PostalAboutScroll then
90 | S:HandleScrollBar(PostalAboutScrollScrollBar)
91 | end
92 |
93 | local closeButton = select(2, PostalAboutFrame:GetChildren())
94 | if closeButton then
95 | S:HandleCloseButton(closeButton)
96 | end
97 | end
98 | end)
99 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Custom_Achievement.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | local function SkinSearchButton(self)
5 | self:StripTextures()
6 |
7 | if self.icon then
8 | S:HandleIcon(self.icon)
9 | end
10 |
11 | self:CreateBackdrop("Transparent")
12 | self:SetHighlightTexture(E.media.normTex)
13 |
14 | local hl = self:GetHighlightTexture()
15 | hl:SetVertexColor(1, 1, 1, 0.3)
16 | hl:Point("TOPLEFT", 1, -1)
17 | hl:Point("BOTTOMRIGHT", -1, 1)
18 | end
19 |
20 | S:AddCallbackForAddon("Blizzard_AchievementUI", "Skin_Custom_AchievementUI", function()
21 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.achievement then return end
22 |
23 | AchievementFrameFilterDropDown:ClearAllPoints()
24 | AchievementFrameFilterDropDown:Point("TOPLEFT", AchievementFrame, "TOPLEFT", 220, -6)
25 |
26 | S:HandleEditBox(AchievementFrame.searchBox)
27 | AchievementFrame.searchBox.backdrop:Point("TOPLEFT", AchievementFrame.searchBox, "TOPLEFT", -3, -3)
28 | AchievementFrame.searchBox.backdrop:Point("BOTTOMRIGHT", AchievementFrame.searchBox, "BOTTOMRIGHT", 0, 3)
29 | AchievementFrame.searchBox:ClearAllPoints()
30 | AchievementFrame.searchBox:Point("TOPLEFT", AchievementFrame, "TOPLEFT", 604, -6)
31 | AchievementFrame.searchBox:Size(107, 25)
32 |
33 | AchievementFrame.searchResults:StripTextures()
34 | AchievementFrame.searchResults:CreateBackdrop("Transparent")
35 | AchievementFrame.searchPreviewContainer:StripTextures()
36 | AchievementFrame.searchPreviewContainer:ClearAllPoints()
37 | AchievementFrame.searchPreviewContainer:Point("TOPLEFT", AchievementFrame, "TOPRIGHT", 2, -1)
38 |
39 | for i = 1, 5 do
40 | SkinSearchButton(AchievementFrame.searchPreviewContainer["searchPreview"..i])
41 | end
42 | SkinSearchButton(AchievementFrame.searchPreviewContainer.showAllSearchResults)
43 |
44 | hooksecurefunc("AchievementFrame_UpdateFullSearchResults", function()
45 | local numResults = GetNumFilteredAchievements()
46 |
47 | local scrollFrame = AchievementFrame.searchResults.scrollFrame
48 | local offset = HybridScrollFrame_GetOffset(scrollFrame)
49 | local results = scrollFrame.buttons
50 | local result, index
51 |
52 | for i = 1, #results do
53 | result = results[i]
54 | index = offset + i
55 |
56 | if index <= numResults then
57 | if not result.styled then
58 | result:SetNormalTexture("")
59 | result:SetPushedTexture("")
60 | result:GetRegions():SetAlpha(0)
61 |
62 | result.resultType:SetTextColor(1, 1, 1)
63 | result.path:SetTextColor(1, 1, 1)
64 |
65 | result.styled = true
66 | end
67 |
68 | if result.icon:GetTexCoord() == 0 then
69 | result.icon:SetTexCoord(unpack(E.TexCoords))
70 | end
71 | end
72 | end
73 | end)
74 |
75 | hooksecurefunc(AchievementFrame.searchResults.scrollFrame, "update", function(self)
76 | for i = 1, #self.buttons do
77 | local result = self.buttons[i]
78 |
79 | if result.icon:GetTexCoord() == 0 then
80 | result.icon:SetTexCoord(unpack(E.TexCoords))
81 | end
82 | end
83 | end)
84 |
85 | S:HandleCloseButton(AchievementFrame.searchResults.closeButton)
86 | S:HandleScrollBar(AchievementFrameSearchResultsScrollFrameScrollBar)
87 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/AddOnSkins/MoveAnything.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI)
2 | local S = E:GetModule("Skins")
3 | local AS = E:GetModule("AddOnSkins", true)
4 | if not AS then return end
5 |
6 | if not AS:IsAddonLODorEnabled("MoveAnything") then return end
7 |
8 | local _G = _G
9 | local unpack = unpack
10 |
11 | -- MoveAnything 3.3.5-10
12 | -- https://www.curseforge.com/wow/addons/move-anything/files/434496
13 |
14 | S:RemoveCallbackForAddon("MoveAnything", "MoveAnything")
15 | S:AddCallbackForAddon("MoveAnything", "MoveAnything", function()
16 | if not E.private.addOnSkins.MoveAnything then return end
17 |
18 | local SPACING = 1 + (E.Spacing * 2)
19 |
20 | local function moverOnShow(self)
21 | _G[self:GetName() .. "Backdrop"]:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor))
22 | end
23 | local function moverOnEnter(self)
24 | _G[self:GetName() .. "BackdropMovingFrameName"]:SetTextColor(1, 1, 1)
25 | end
26 | local function moverOnLeave(self)
27 | _G[self:GetName() .. "BackdropMovingFrameName"]:SetTextColor(unpack(E.media.rgbvaluecolor))
28 | end
29 |
30 | local function skinMover(frameName)
31 | _G[frameName .. "Backdrop"]:SetTemplate("Transparent")
32 |
33 | _G[frameName]:HookScript("OnShow", moverOnShow)
34 | _G[frameName]:SetScript("OnEnter", moverOnEnter)
35 | _G[frameName]:SetScript("OnLeave", moverOnLeave)
36 | end
37 |
38 | for i = 1, #MovAny.movers do
39 | skinMover(MovAny.movers[i]:GetName())
40 | end
41 |
42 | local numSkinnedMovers = #MovAny.movers
43 | hooksecurefunc(MovAny, "GetAvailableMover", function(self)
44 | local numMovers = #self.movers
45 | if numMovers > numSkinnedMovers then
46 | skinMover(self.movers[numMovers]:GetName())
47 | numSkinnedMovers = numMovers
48 | end
49 | end)
50 |
51 | MAOptions:StripTextures()
52 | MAOptions:SetTemplate("Transparent")
53 | MAOptions:Size(420, 500 + (16 * SPACING))
54 |
55 | S:HandleCheckBox(MAOptionsToggleModifiedFramesOnly)
56 | S:HandleCheckBox(MAOptionsToggleCategories)
57 | S:HandleCheckBox(MAOptionsToggleFrameEditors)
58 | S:HandleCheckBox(MAOptionsToggleFrameStack)
59 |
60 | S:HandleButton(MAOptionsClose)
61 | S:HandleButton(MAOptionsSync)
62 | S:HandleButton(MAOptionsOpenBlizzardOptions)
63 |
64 | S:HandleEditBox(MA_Search)
65 | MA_Search:Width(388)
66 |
67 | MAScrollFrame:Size(380, 442 + (16 * SPACING))
68 | S:HandleScrollBar(MAScrollFrameScrollBar)
69 | MAScrollBorder:StripTextures()
70 |
71 | MANudger:SetTemplate("Transparent")
72 | S:HandleButton(MANudger_NudgeUp)
73 | MANudger_NudgeUp:Point("CENTER", 0, 24 + SPACING)
74 | S:HandleButton(MANudger_CenterMe)
75 | MANudger_CenterMe:Point("TOP", MANudger_NudgeUp, "BOTTOM", 0, -SPACING)
76 | S:HandleButton(MANudger_NudgeDown)
77 | MANudger_NudgeDown:Point("TOP", MANudger_CenterMe, "BOTTOM", 0, -SPACING)
78 | S:HandleButton(MANudger_NudgeLeft)
79 | MANudger_NudgeLeft:Point("RIGHT", MANudger_CenterMe, "LEFT", -SPACING, 0)
80 | S:HandleButton(MANudger_NudgeRight)
81 | MANudger_NudgeRight:Point("LEFT", MANudger_CenterMe, "RIGHT", SPACING, 0)
82 | S:HandleButton(MANudger_CenterH)
83 | S:HandleButton(MANudger_CenterV)
84 | S:HandleButton(MANudger_Detach)
85 | S:HandleButton(MANudger_Hide)
86 | S:HandleButton(MANudger_MoverPlus)
87 | S:HandleButton(MANudger_MoverMinus)
88 |
89 | S:HandleButton(GameMenuButtonMoveAnything)
90 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Misc.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | --WoW API / Variables
7 |
8 | -- Скиннер кнопок NavBar`a с ретейл версии ElvUI.
9 | local function SkinNavBarButtons(self)
10 | if (self:GetParent():GetName() == "EncounterJournal" and not E.private.skins.blizzard.encounterjournal) or (self:GetParent():GetName() == "WorldMapFrame" and not E.private.skins.blizzard.worldmap) or (self:GetParent():GetName() == "HelpFrameKnowledgebase" and not E.private.skins.blizzard.help) then
11 | return
12 | end
13 |
14 | local navButton = self.navList[#self.navList]
15 | if navButton and not navButton.isSkinned then
16 | S:HandleButton(navButton, true)
17 | navButton:GetFontString():SetTextColor(1, 1, 1)
18 | if navButton.MenuArrowButton then
19 | navButton.MenuArrowButton:StripTextures()
20 | if navButton.MenuArrowButton.Art then
21 | navButton.MenuArrowButton.Art:Size(18)
22 | navButton.MenuArrowButton.Art:SetTexture(E.Media.Textures.ArrowUp)
23 | navButton.MenuArrowButton.Art:SetTexCoord(0, 1, 0, 1)
24 | navButton.MenuArrowButton.Art:SetRotation(3.14)
25 | end
26 | end
27 |
28 | navButton.xoffset = 1
29 |
30 | navButton.isSkinned = true
31 | end
32 | end
33 |
34 | local function LoadSkin()
35 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.misc ~= true then return end
36 |
37 | local BlizzardMenuButtons = {
38 | "Help",
39 | "Store",
40 | "PromoCodes",
41 | "AudioOptions",
42 | }
43 |
44 | for i = 1, #BlizzardMenuButtons do
45 | local ElvuiMenuButtons = _G["GameMenuButton"..BlizzardMenuButtons[i]]
46 | if ElvuiMenuButtons then
47 | S:HandleButton(ElvuiMenuButtons)
48 | end
49 | end
50 |
51 | -- Static Popups
52 | for i = 1, 4 do
53 | local staticPopup = _G["StaticPopup"..i]
54 | staticPopup.bar:StripTextures()
55 | staticPopup.bar:CreateBackdrop("Transparent")
56 |
57 |
58 | staticPopup.bar:Point("TOP", staticPopup, "BOTTOM", 0, -4)
59 | staticPopup.bar:SetStatusBarTexture(E.media.normTex)
60 | E:RegisterStatusBar(staticPopup.bar)
61 | end
62 |
63 | if InterfaceOptionsCombatPanelTargetOfTarget:GetAlpha() == 0 then
64 | InterfaceOptionsCombatPanelTOTDropDown:ClearAllPoints()
65 | InterfaceOptionsCombatPanelTOTDropDown:SetPoint("TOPRIGHT", InterfaceOptionsCombatPanelSubText, "BOTTOMRIGHT", 0, -2)
66 | end
67 |
68 | hooksecurefunc("NavBar_AddButton", SkinNavBarButtons)
69 |
70 | -- GhostFrame
71 | GhostFrame:StripTextures(nil, true)
72 | S:HandleButton(GhostFrame)
73 | GhostFrame:SetTemplate("Transparent")
74 | GhostFrameContentsFrameIcon:CreateBackdrop()
75 | GhostFrameContentsFrameIcon:SetTexCoord(unpack(E.TexCoords))
76 |
77 | local GhostFrameHolder = CreateFrame("Frame", "GhostFrameHolder", E.UIParent)
78 | GhostFrameHolder:Size(130, 46)
79 | GhostFrameHolder:Point("TOP", E.UIParent, "TOP", 0, -70)
80 |
81 | E:CreateMover(GhostFrameHolder, "GhostFrameMover", L["Ghost Frame"])
82 | GhostFrameMover:SetFrameStrata("FULLSCREEN")
83 | GhostFrameHolder:SetAllPoints(GhostFrameMover)
84 |
85 | hooksecurefunc(GhostFrame, "SetPoint", function(self, _, parent)
86 | if parent ~= GhostFrameHolder then
87 | self:ClearAllPoints()
88 | self:SetPoint("CENTER", GhostFrameHolder, "CENTER")
89 | end
90 | end)
91 | end
92 |
93 | S:AddCallback("Sirus_Misc", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_TimeManager.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.timemanager ~= true then return; end
9 |
10 | TimeManagerFrame:Size(190, 240)
11 | TimeManagerFrame:StripTextures()
12 | TimeManagerFrame:SetTemplate("Transparent")
13 |
14 | E:CreateMover(TimeManagerFrame, "TimeManagerFrameMover", TIMEMANAGER_TITLE)
15 | TimeManagerFrame.mover:SetFrameLevel(TimeManagerFrame:GetFrameLevel() + 4)
16 |
17 | select(7, TimeManagerFrame:GetRegions()):Point("TOP", 0, -5)
18 |
19 | TimeManagerCloseButton:Point("TOPRIGHT", 4, 5)
20 | S:HandleCloseButton(TimeManagerCloseButton)
21 |
22 | TimeManagerStopwatchFrame:Point("TOPRIGHT", 10, -12)
23 |
24 | TimeManagerStopwatchFrameBackground:SetTexture(nil)
25 |
26 | TimeManagerStopwatchCheck:SetTemplate("Default")
27 | TimeManagerStopwatchCheck:StyleButton(nil, true)
28 |
29 | TimeManagerStopwatchCheck:GetNormalTexture():SetInside()
30 | TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
31 |
32 | TimeManagerAlarmTimeFrame:Point("TOPLEFT", 12, -65)
33 |
34 | S:HandleDropDownBox(TimeManagerAlarmHourDropDown, 80)
35 | S:HandleDropDownBox(TimeManagerAlarmMinuteDropDown, 80)
36 | S:HandleDropDownBox(TimeManagerAlarmAMPMDropDown, 80)
37 |
38 | S:HandleEditBox(TimeManagerAlarmMessageEditBox)
39 |
40 | TimeManagerAlarmEnabledButton:Point("LEFT", 16, -45)
41 | TimeManagerAlarmEnabledButton:SetNormalTexture(nil)
42 | TimeManagerAlarmEnabledButton.SetNormalTexture = E.noop
43 | TimeManagerAlarmEnabledButton:SetPushedTexture(nil)
44 | TimeManagerAlarmEnabledButton.SetPushedTexture = E.noop
45 | S:HandleButton(TimeManagerAlarmEnabledButton)
46 |
47 | TimeManagerMilitaryTimeCheck:Point("TOPLEFT", 155, -190)
48 | S:HandleCheckBox(TimeManagerMilitaryTimeCheck)
49 | S:HandleCheckBox(TimeManagerLocalTimeCheck)
50 |
51 | StopwatchFrame:CreateBackdrop("Transparent")
52 | StopwatchFrame.backdrop:Point("TOPLEFT", 0, -16)
53 | StopwatchFrame.backdrop:Point("BOTTOMRIGHT", 0, 2)
54 |
55 | StopwatchFrame:StripTextures()
56 |
57 | StopwatchTabFrame:StripTextures()
58 |
59 | S:HandleCloseButton(StopwatchCloseButton)
60 |
61 | StopwatchPlayPauseButton:CreateBackdrop("Default", true)
62 | StopwatchPlayPauseButton:SetSize(12, 12)
63 | StopwatchPlayPauseButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\play")
64 | StopwatchPlayPauseButton:SetHighlightTexture("")
65 | StopwatchPlayPauseButton.backdrop:SetOutside(StopwatchPlayPauseButton, 2, 2)
66 | StopwatchPlayPauseButton:HookScript("OnEnter", S.SetModifiedBackdrop)
67 | StopwatchPlayPauseButton:HookScript("OnLeave", S.SetOriginalBackdrop)
68 | StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0)
69 | S:HandleButton(StopwatchResetButton)
70 | StopwatchResetButton:SetSize(16,16)
71 | StopwatchResetButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\reset")
72 | StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6)
73 |
74 | local function SetPlayTexture()
75 | StopwatchPlayPauseButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\play")
76 | end
77 | local function SetPauseTexture()
78 | StopwatchPlayPauseButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\pause")
79 | end
80 | hooksecurefunc("Stopwatch_Play", SetPauseTexture)
81 | hooksecurefunc("Stopwatch_Pause", SetPlayTexture)
82 | hooksecurefunc("Stopwatch_Clear", SetPlayTexture)
83 | end
84 |
85 | S:RemoveCallbackForAddon("Blizzard_TimeManager", "Skin_Blizzard_TimeManager")
86 | S:AddCallback("Sirus_TimeManager", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataTexts/ArenaRating.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local DT = E:GetModule("DataTexts")
3 |
4 | --Lua functions
5 | local ipairs = ipairs
6 | local join = string.join
7 | local format = string.format
8 | local tinsert = table.insert
9 | local tconcat = table.concat
10 | --WoW API / Variables
11 | local GetArenaRating = GetArenaRating
12 | local GetRatedBattlegroundRankInfo = GetRatedBattlegroundRankInfo
13 | local TogglePVPUIFrame = TogglePVPUIFrame
14 |
15 | local displayNumberString = ""
16 | local lastPanel
17 |
18 | local brackets = {
19 | [1] = "Solo",
20 | [2] = "2x2",
21 | [3] = "3x3",
22 | [4] = "RBG",
23 | }
24 |
25 | local tbl = {}
26 |
27 | local function OnEvent(self)
28 | lastPanel = self
29 |
30 | table.wipe(tbl)
31 |
32 | local _, _, _, _, currRating = GetRatedBattlegroundRankInfo()
33 | for i, enabled in ipairs(E.db.datatexts.ArenaRating) do
34 | if enabled then
35 | tinsert(tbl, format(displayNumberString, brackets[i], (i == 4 and currRating or GetArenaRating(i)) or 0))
36 | end
37 | end
38 |
39 | self.text:SetText(tconcat(tbl, " "))
40 | end
41 |
42 | local function OnClick()
43 | TogglePVPUIFrame()
44 | end
45 |
46 | local textFormat = "|cff00ff00%d|r |cffff0000%d|r %d%%"
47 |
48 | local function OnEnter(self)
49 | DT:SetupTooltip(self)
50 |
51 | local pvpStats = C_CacheInstance:Get("ASMSG_PVP_STATS", {})
52 | for i, enabled in ipairs(E.db.datatexts.ArenaRating) do
53 | if enabled then
54 | DT.tooltip:AddLine(brackets[i])
55 |
56 | if i == 4 then
57 | local _, _, _, _, _, _, _, _, _, weekWins, weekGames, seasonWins, seasonGames = GetRatedBattlegroundRankInfo()
58 | local weekPerc, seasonPerc = weekGames == 0 and 0 or math.ceil(weekWins / weekGames * 100), seasonGames == 0 and 0 or math.ceil(seasonWins / seasonGames * 100)
59 |
60 | DT.tooltip:AddDoubleLine(PVP_LADDER_WEEK, format(textFormat, weekWins, weekGames - weekWins, weekPerc), 1, 1, 1, weekPerc >= 50 and 0 or 1, weekPerc >= 50 and 1 or 0, 0)
61 | DT.tooltip:AddDoubleLine(PVP_LADDER_SEASON, format(textFormat, seasonWins, seasonGames - seasonWins, seasonPerc), 1, 1, 1, seasonPerc >= 50 and 0 or 1, seasonPerc >= 50 and 1 or 0, 0)
62 | else
63 | local todayWins, todayGames, weekWins, weekGames, seasonWins, seasonGames = pvpStats[i] and pvpStats[i].TodayWins or 0, pvpStats[i] and pvpStats[i].TodayGames or 0, pvpStats[i] and pvpStats[i].weekWins or 0, pvpStats[i] and pvpStats[i].weekGames or 0,pvpStats[i] and pvpStats[i].seasonWins or 0, pvpStats[i] and pvpStats[i].seasonGames or 0
64 | local todayPerc, weekPerc, seasonPerc = todayGames == 0 and 0 or math.ceil(todayWins / todayGames * 100), weekGames == 0 and 0 or math.ceil(weekWins / weekGames * 100), seasonGames == 0 and 0 or math.ceil(seasonWins / seasonGames * 100)
65 |
66 | DT.tooltip:AddDoubleLine(PVP_LADDER_DAY, format(textFormat, todayWins, todayGames - todayWins, todayPerc), 1, 1, 1, todayPerc >= 50 and 0 or 1, todayPerc >= 50 and 1 or 0, 0)
67 | DT.tooltip:AddDoubleLine(PVP_LADDER_WEEK, format(textFormat, weekWins, weekGames - weekWins, weekPerc), 1, 1, 1, weekPerc >= 50 and 0 or 1, weekPerc >= 50 and 1 or 0, 0)
68 | DT.tooltip:AddDoubleLine(PVP_LADDER_SEASON, format(textFormat, seasonWins, seasonGames - seasonWins, seasonPerc), 1, 1, 1, seasonPerc >= 50 and 0 or 1, seasonPerc >= 50 and 1 or 0, 0)
69 | end
70 | end
71 | end
72 |
73 | DT.tooltip:Show()
74 | end
75 |
76 | local function ValueColorUpdate(hex)
77 | displayNumberString = join("", "%s: ", hex, "%d|r")
78 |
79 | if lastPanel ~= nil then
80 | OnEvent(lastPanel)
81 | end
82 | end
83 | E.valueColorUpdateFuncs[ValueColorUpdate] = true
84 |
85 | DT:RegisterDatatext("ArenaRating", {"PLAYER_ENTERING_WORLD", "ZONE_CHANGED_NEW_AREA"}, OnEvent, nil, OnClick, OnEnter, nil, PVP_YOUR_RATING)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Auras/Auras.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local A = E:GetModule("Auras")
3 |
4 | --Lua functions
5 | local next = next
6 | local wipe, tinsert, tsort, tremove = table.wipe, table.insert, table.sort, table.remove
7 | --WoW API / Variables
8 | local UnitAura = UnitAura
9 |
10 | local freshTable
11 | local releaseTable
12 | do
13 | local tableReserve = {}
14 | freshTable = function ()
15 | local t = next(tableReserve) or {}
16 | tableReserve[t] = nil
17 | return t
18 | end
19 | releaseTable = function (t)
20 | tableReserve[t] = wipe(t)
21 | end
22 | end
23 |
24 | local function sortFactory(key, separateOwn, reverse)
25 | if separateOwn ~= 0 then
26 | if reverse then
27 | return function(a, b)
28 | if a.filter == b.filter then
29 | local ownA, ownB = a.caster == "player", b.caster == "player"
30 | if ownA ~= ownB then
31 | return ownA == (separateOwn > 0)
32 | end
33 | return a[key] > b[key]
34 | else
35 | return a.filter < b.filter
36 | end
37 | end;
38 | else
39 | return function(a, b)
40 | if a.filter == b.filter then
41 | local ownA, ownB = a.caster == "player", b.caster == "player"
42 | if ownA ~= ownB then
43 | return ownA == (separateOwn > 0)
44 | end
45 | return a[key] < b[key]
46 | else
47 | return a.filter < b.filter
48 | end
49 | end;
50 | end
51 | else
52 | if reverse then
53 | return function(a, b)
54 | if a.filter == b.filter then
55 | return a[key] > b[key]
56 | else
57 | return a.filter < b.filter
58 | end
59 | end;
60 | else
61 | return function(a, b)
62 | if a.filter == b.filter then
63 | return a[key] < b[key]
64 | else
65 | return a.filter < b.filter
66 | end
67 | end;
68 | end
69 | end
70 | end
71 |
72 | local sorters = {}
73 | for _, key in ipairs{"index", "name", "expires"} do
74 | local label = string.upper(key)
75 | sorters[label] = {}
76 | for bool in pairs{[true] = true, [false] = false} do
77 | sorters[label][bool] = {}
78 | for sep = -1, 1 do
79 | sorters[label][bool][sep] = sortFactory(key, sep, bool)
80 | end
81 | end
82 | end
83 | sorters.TIME = sorters.EXPIRES
84 |
85 | local sortingTable = {}
86 | function A:UpdateHeader(header)
87 | local filter = header.filter
88 | local db = self.db.debuffs
89 |
90 | wipe(sortingTable)
91 |
92 | local weaponPosition
93 | if filter == "HELPFUL" then
94 | db = self.db.buffs
95 | weaponPosition = 1
96 | end
97 |
98 | local i, spellID = 1
99 | repeat
100 | local aura, _ = freshTable()
101 | aura.name, _, aura.icon, aura.count, aura.dispelType, aura.duration, aura.expires, aura.caster, _, _, spellID = UnitAura("player", i, filter)
102 | if aura.name then
103 | aura.filter = filter
104 | aura.index = i
105 |
106 | if db.filter ~= "" and E.global.unitframe.aurafilters[db.filter] then
107 | local aurafilter = E.global.unitframe.aurafilters[db.filter]
108 | local filterType = aurafilter.type
109 | local spellList = aurafilter.spells
110 | local spell = spellList and (spellList[spellID] or spellList[aura.name])
111 |
112 | if not ((filterType == "Blacklist") and (spell and spell.enable)) then
113 | tinsert(sortingTable, aura)
114 | end
115 | else
116 | tinsert(sortingTable, aura)
117 | end
118 | else
119 | releaseTable(aura)
120 | end
121 | i = i + 1
122 | until not aura.name
123 |
124 | local sortMethod = (sorters[db.sortMethod] or sorters.INDEX)[db.sortDir == "-"][db.seperateOwn]
125 | tsort(sortingTable, sortMethod)
126 |
127 | self:ConfigureAuras(header, sortingTable, weaponPosition)
128 | while sortingTable[1] do
129 | releaseTable(tremove(sortingTable))
130 | end
131 |
132 | if self.LBFGroup then
133 | self.LBFGroup:Skin(E.private.auras.lbf.skin)
134 | end
135 | end
136 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/AddOnSkins/GnomishVendorShrinker.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI)
2 | local S = E:GetModule("Skins")
3 | local AS = E:GetModule("AddOnSkins", true)
4 | if not AS then return end
5 |
6 | if not AS:IsAddonLODorEnabled("GnomishVendorShrinker") then return end
7 |
8 | local unpack = unpack
9 |
10 | -- GnomishVendorShrinker 3.3.0.6
11 | -- https://www.curseforge.com/wow/addons/gnomishvendorshrinker/files/426171
12 |
13 | S:RemoveCallbackForAddon("GnomishVendorShrinker", "GnomishVendorShrinker")
14 | S:AddCallbackForAddon("GnomishVendorShrinker", "GnomishVendorShrinker", function()
15 | if not E.private.addOnSkins.GnomishVendorShrinker then return end
16 |
17 | if GVSEditBox then
18 | GVSEditBox:StripTextures()
19 | S:HandleEditBox(GVSEditBox)
20 | GVSEditBox:Size(135, 19)
21 | GVSEditBox:SetScale(1)
22 |
23 | GVSMerchantFrame:CreateBackdrop("Transparent")
24 | S:HandleButton(GVSScrollButton1)
25 | S:HandleButton(GVSScrollButton2)
26 | GVSScrollFrame:StripTextures()
27 | S:HandleSliderFrame(GVSScrollBar)
28 |
29 | return
30 | end
31 |
32 | local GVS = GVSFrame or AS:FindChildFrameByPoint(MerchantFrame, "Frame", "TOPLEFT", MerchantFrame, "TOPLEFT", 21, -77)
33 | if not GVS then return end
34 |
35 | GVS:Size(304, 294)
36 | GVS:Point("TOPLEFT", 6, -54)
37 | GVS:SetTemplate("Transparent")
38 |
39 | MerchantBuyBackItem:ClearAllPoints()
40 | MerchantBuyBackItem:Point("BOTTOMLEFT", 172, 32)
41 |
42 | local popoutButtonOnEnter = function(self) self.icon:SetVertexColor(unpack(E.media.rgbvaluecolor)) end
43 | local popoutButtonOnLeave = function(self) self.icon:SetVertexColor(1, 1, 1) end
44 |
45 | local skinCurrencyIcons = function(self)
46 | if self.altframesSkinned < #self.altframes then
47 | for _, frame in ipairs(self.altframes) do
48 | frame.icon:SetTexCoord(unpack(E.TexCoords))
49 | end
50 | self.altframesSkinned = #self.altframes
51 | end
52 | end
53 |
54 | for _, child in ipairs({GVS:GetChildren()}) do
55 | local objType = child:GetObjectType()
56 |
57 | if objType == "Button" then
58 | child:Point("RIGHT", -3, 0)
59 |
60 | S:HandleButtonHighlight(child)
61 |
62 | if child.icon then
63 | child.icon:SetTexCoord(unpack(E.TexCoords))
64 | end
65 |
66 | if child.popout then
67 | child.popout:StripTextures()
68 | child.popout:HookScript("OnEnter", popoutButtonOnEnter)
69 | child.popout:HookScript("OnLeave", popoutButtonOnLeave)
70 |
71 | child.popout.icon = child.popout:CreateTexture(nil, "ARTWORK")
72 | child.popout.icon:Size(21)
73 | child.popout.icon:SetPoint("CENTER")
74 | child.popout.icon:SetTexture(E.Media.Textures.ArrowUp)
75 | child.popout.icon:SetRotation(S.ArrowRotation.right)
76 | end
77 |
78 | child.altframesSkinned = 0
79 | hooksecurefunc(child, "AddAltCurrency", skinCurrencyIcons)
80 | elseif objType == "EditBox" then
81 | for _, region in ipairs({child:GetRegions()}) do
82 | if region:GetDrawLayer() == "BORDER" then
83 | region:SetTexture(nil)
84 | end
85 | end
86 |
87 | child:Height(18)
88 | child:Point("TOPLEFT", GVS, "BOTTOMLEFT", 1, -73)
89 | S:HandleEditBox(child)
90 | elseif objType == "Slider" then
91 | for _, child2 in ipairs({child:GetChildren()}) do
92 | local objType2 = child2:GetObjectType()
93 |
94 | if objType2 == "Button" then
95 | local texture = child2:GetNormalTexture():GetTexture()
96 |
97 | if texture == "Interface\\Buttons\\UI-ScrollBar-ScrollUpButton-Up" then
98 | S:HandleNextPrevButton(child2, "up")
99 | child2:Point("BOTTOM", child2:GetParent(), "TOP", 0, 1)
100 | elseif texture == "Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Up" then
101 | S:HandleNextPrevButton(child2, "down")
102 | child2:Point("TOP", child2:GetParent(), "BOTTOM", 0, -1)
103 | end
104 | elseif objType2 == "Frame" then
105 | child2:SetBackdrop(nil)
106 | end
107 | end
108 |
109 | child:Width(18)
110 | child:Point("TOPRIGHT", 21, -19)
111 | child:Point("BOTTOMRIGHT", 21, 19)
112 |
113 | S:HandleScrollBar(child)
114 | end
115 | end
116 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Custom_Headhunting.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.headhunting then return end
9 |
10 | local HeadHuntingFrame = HeadHuntingFrame
11 | S:HandlePortraitFrame(HeadHuntingFrame)
12 |
13 | for i = 1, 3 do
14 | local popup = HeadHuntingFrame["PopupFrame"..i]
15 | popup:SetTemplate("Transparent")
16 | S:HandleButton(popup.Button1)
17 | end
18 |
19 | HeadHuntingFrame.navBar:StripTextures()
20 | HeadHuntingFrame.navBar.overlay:StripTextures()
21 |
22 | S:HandleButton(HeadHuntingFrame.navBar.home, true)
23 | HeadHuntingFrame.navBar.home.xoffset = 1
24 |
25 | HeadHuntingFrame.inset:StripTextures()
26 |
27 | S:HandleButton(HeadHuntingFrame.Container.HomeTab, true)
28 | S:HandleButton(HeadHuntingFrame.Container.AllTargetsTab, true)
29 | S:HandleButton(HeadHuntingFrame.Container.YouTargetsTab, true)
30 |
31 | local function Panel_OnShow(self)
32 | for _, button in ipairs(HeadHuntingFrame.columnButtons) do
33 | if not button.isSkinned then
34 | button:StripTextures()
35 | button:StyleButton()
36 | button.isSkinned = true
37 | end
38 | end
39 | end
40 |
41 | local HomePanel = HeadHuntingFrame.Container.HomePanel
42 | HomePanel:HookScript("OnShow", Panel_OnShow)
43 | -- HomePanel:SetTemplate("Transparent")
44 | S:HandleButton(HomePanel.SuggestionFrameRightTop.CenterDisplay.ButtonLeft)
45 | S:HandleButton(HomePanel.SuggestionFrameRightTop.CenterDisplay.ButtonRight)
46 | S:HandleButton(HomePanel.SuggestionFrameRightBottom.CenterDisplay.ButtonLeft)
47 | S:HandleButton(HomePanel.SuggestionFrameRightBottom.CenterDisplay.ButtonRight)
48 |
49 | local AllTargetsPanel = HeadHuntingFrame.Container.AllTargetsPanel
50 | AllTargetsPanel:HookScript("OnShow", Panel_OnShow)
51 | -- AllTargetsPanel:SetTemplate("Transparent")
52 | AllTargetsPanel.ScrollFrame.Background:SetAlpha(0)
53 | S:HandleScrollBar(HeadHuntingFrameContainerAllTargetsPanelScrollFrameScrollBar)
54 | AllTargetsPanel.ScrollFrame.ShadowOverlay:SetAlpha(0)
55 |
56 | AllTargetsPanel.InfoFrame:SetTemplate("Transparent")
57 | AllTargetsPanel.InfoFrame.BackgroundTile:SetAlpha(0)
58 | AllTargetsPanel.InfoFrame.ShadowOverlay:SetAlpha(0)
59 | S:HandleScrollBar(HeadHuntingFrameContainerAllTargetsPanelInfoFrameContainerScrollFrameScrollBar)
60 |
61 | local closseButton = select(3, AllTargetsPanel.InfoFrame:GetChildren())
62 | S:HandleCloseButton(closseButton)
63 | closseButton.Corner:SetAlpha(0)
64 |
65 | AllTargetsPanel.ContractOnPlayer:StripTextures()
66 |
67 | local YouTargetsPanel = HeadHuntingFrame.Container.YouTargetsPanel
68 | YouTargetsPanel:HookScript("OnShow", Panel_OnShow)
69 | -- YouTargetsPanel:SetTemplate("Transparent")
70 |
71 | S:HandleButton(YouTargetsPanel.SetRewardButton)
72 | YouTargetsPanel.ScrollFrame.Background:SetAlpha(0)
73 | S:HandleScrollBar(HeadHuntingFrameContainerYouTargetsPanelScrollFrameScrollBar)
74 | YouTargetsPanel.ScrollFrame.ShadowOverlay:SetAlpha(0)
75 |
76 | YouTargetsPanel.DetailsFrame:SetTemplate("Transparent")
77 | YouTargetsPanel.DetailsFrame.CloseCorner:SetAlpha(0)
78 | YouTargetsPanel.DetailsFrame.Divider:SetAlpha(0)
79 | S:HandleCheckBox(YouTargetsPanel.DetailsFrame.Container.NotifyWhenKilling)
80 | S:HandleCheckBox(YouTargetsPanel.DetailsFrame.Container.NotifyWhenComplete)
81 | S:HandleCloseButton(YouTargetsPanel.DetailsFrame.CloseButton)
82 | S:HandleButton(YouTargetsPanel.DetailsFrame.RemoveContractButton)
83 |
84 | local function SkinRewardFrame(frame)
85 | S:HandlePortraitFrame(frame)
86 | S:HandleEditBox(frame.SearchFrame.SearchBox)
87 | S:HandleButton(frame.SearchFrame.SearchButton)
88 | frame.CentralContainer:StripTextures()
89 | frame.CentralContainer.ScrollFrame.ShadowOverlay:SetAlpha(0)
90 | S:HandleScrollBar(_G[frame:GetName().."CentralContainerScrollFrameScrollBar"])
91 | S:HandleEditBox(frame.NumKills)
92 | S:HandleEditBox(frame.GoldPerKillsEditBox)
93 | S:HandleButton(frame.SetRewardButton)
94 | end
95 |
96 | SkinRewardFrame(YouTargetsPanel.SetRewardFrame)
97 |
98 | for i = 1, 2 do
99 | S:HandleTab(_G["HeadHuntingFrameTab"..i])
100 | end
101 |
102 | HeadHuntingSetRewardExternalFrame:SetParent(UIParent)
103 | SkinRewardFrame(HeadHuntingSetRewardExternalFrame)
104 | end
105 |
106 | S:AddCallback("Custom_Headhunting", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Guild.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.guild ~= true then return end
11 |
12 | -- Guild Frame
13 | S:HandlePortraitFrame(GuildFrame)
14 |
15 | GuildXPBar:StripTextures()
16 | GuildXPBar.progress:SetTexture(E.media.normTex)
17 | E:RegisterStatusBar(GuildXPBar.progress)
18 | GuildXPBar.cap:SetTexture(E.media.normTex)
19 | E:RegisterStatusBar(GuildXPBar.cap)
20 | GuildXPBarArt:StripTextures()
21 | GuildXPBar:CreateBackdrop()
22 | GuildXPBar.backdrop:SetOutside(GuildXPBarBG)
23 |
24 | for i = 1, 4 do
25 | local tab = _G["GuildFrameRightTab"..i]
26 | if i == 1 then
27 | tab:Point("TOPLEFT", GuildFrame, "TOPRIGHT", -E.Border, -36)
28 | end
29 | tab:GetRegions():Hide()
30 | tab:StyleButton()
31 | tab:SetTemplate("Default", true)
32 |
33 | tab.Icon:SetInside()
34 | tab.Icon:SetTexCoord(unpack(E.TexCoords))
35 | end
36 |
37 | -- top tab
38 | for i = 1, 3 do
39 | local tab = _G["GuildInfoFrameTab"..i]
40 | S:HandleTab(tab)
41 | end
42 |
43 | S:HandleButton(GuildRecruitmentInviteButton, true)
44 | S:HandleButton(GuildRecruitmentMessageButton, true)
45 | S:HandleButton(GuildRecruitmentDeclineButton, true)
46 |
47 | -- GuildPerks Frame
48 | GuildAllPerksFrame:StripTextures()
49 | S:HandleScrollBar(GuildPerksContainerScrollBar)
50 |
51 | for i = 1, #GuildPerksContainer.buttons do
52 | local button = GuildPerksContainer.buttons[i]
53 | button:StripTextures()
54 |
55 | button.icon:CreateBackdrop()
56 | button.icon:SetTexCoord(unpack(E.TexCoords))
57 | button.icon:SetParent(button.icon.backdrop)
58 | end
59 |
60 | -- GuildRewards Frame
61 | GuildRewardsFrame:StripTextures()
62 | S:HandleScrollBar(GuildRewardsContainerScrollBar)
63 |
64 | for i = 1, #GuildRewardsContainer.buttons do
65 | local button = GuildRewardsContainer.buttons[i]
66 | button:StripTextures()
67 |
68 | button.icon:CreateBackdrop()
69 | button.icon:SetTexCoord(unpack(E.TexCoords))
70 | button.icon:SetParent(button.icon.backdrop)
71 | end
72 |
73 | -- GuildRoster Frame
74 | S:HandleDropDownBox(GuildRosterViewDropdown)
75 |
76 | for i = 1, 5 do
77 | _G["GuildRosterColumnButton"..i]:StripTextures()
78 | _G["GuildRosterColumnButton"..i]:StyleButton()
79 | end
80 |
81 | S:HandleScrollBar(GuildRosterContainerScrollBar)
82 |
83 | S:HandleCheckBox(GuildRosterShowOfflineButton)
84 |
85 | -- GuildMemberDetail Frame
86 | GuildMemberDetailFrame:StripTextures()
87 | GuildMemberDetailFrame:SetTemplate("Transparent")
88 |
89 | S:HandleCloseButton(GuildMemberDetailCloseButton)
90 |
91 | S:HandleButton(GuildMemberRemoveButton)
92 | S:HandleButton(GuildMemberGroupInviteButton)
93 |
94 | GuildMemberRankDropdown:Point("LEFT", GuildMemberDetailRankLabel, "RIGHT", -18, -3)
95 | S:HandleDropDownBox(GuildMemberRankDropdown)
96 |
97 | GuildMemberNoteBackground:SetTemplate("Transparent")
98 | GuildMemberOfficerNoteBackground:SetTemplate("Transparent")
99 |
100 | -- GuildInfo Frame
101 | GuildInfoFrame:StripTextures()
102 |
103 | S:HandleScrollBar(GuildInfoFrameInfoMOTDScrollFrameScrollBar)
104 | S:HandleButton(GuildInfoEditMOTDButton)
105 | S:HandleButton(GuildInfoEditDetailsButton)
106 | S:HandleScrollBar(GuildInfoDetailsFrameScrollBar)
107 | S:HandleButton(GuildAddMemberButton, true)
108 | S:HandleButton(GuildControlButton, true)
109 | S:HandleButton(GuildViewLogButton, true)
110 | S:HandleButton(GuildRenameButton, true)
111 |
112 | -- GuildTextEditFrame
113 | GuildTextEditFrame:SetTemplate("Transparent")
114 | S:HandleCloseButton(GuildTextEditFrameCloseButton)
115 | GuildTextEditContainer:SetBackdrop(nil)
116 |
117 | S:HandleScrollBar(GuildTextEditScrollFrameScrollBar)
118 |
119 | S:HandleButton(GuildTextEditFrameAcceptButton)
120 | S:HandleButton(GuildTextEditFrameCloseButton)
121 |
122 | -- GuildLogFrame not work for now
123 | GuildLogFrame:StripTextures()
124 | GuildLogFrame:SetTemplate("Transparent")
125 |
126 | local CloseButton, _, CloseButton2 = GuildLogFrame:GetChildren()
127 | S:HandleCloseButton(CloseButton)
128 | GuildLogContainer:SetBackdrop(nil)
129 |
130 | S:HandleScrollBar(GuildLogScrollFrameScrollBar)
131 |
132 | S:HandleButton(CloseButton2)
133 |
134 | end
135 |
136 | S:AddCallback("Guild", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Collections.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local ipairs = ipairs
6 | --WoW API / Variables
7 |
8 | local function LoadSkin()
9 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.collections then return end
10 |
11 | S:HandlePortraitFrame(CollectionsJournal)
12 |
13 | MountJournal.navBar:StripTextures()
14 | MountJournal.navBar.overlay:StripTextures()
15 |
16 | S:HandleButton(MountJournal.navBar.home, true)
17 | MountJournal.navBar.home.xoffset = 1
18 |
19 | MountJournal.navBar:ClearAllPoints()
20 | MountJournal.navBar:SetPoint("TOPLEFT", 6, -22)
21 |
22 | S:HandleEditBox(MountJournal.searchBox)
23 |
24 | MountJournal.FilterButton:StripTextures(true)
25 | S:HandleButton(MountJournal.FilterButton)
26 |
27 | MountJournal.ListScrollFrame:StripTextures()
28 | S:HandleScrollBar(MountJournal.ListScrollFrame.scrollBar)
29 |
30 | for _, button in ipairs(MountJournal.ListScrollFrame.buttons) do
31 | button.icon:Size(40)
32 | button.icon:SetDrawLayer("BORDER")
33 | S:HandleIcon(button.icon)
34 |
35 | local highlight = button:GetHighlightTexture()
36 | button:SetHighlightTexture(E.Media.Textures.Highlight)
37 | highlight:SetTexCoord(0, 1, 0, 1)
38 | highlight:SetVertexColor(1, 1, 1, .35)
39 | highlight:SetAllPoints()
40 |
41 | button.iconBorder:SetTexture()
42 | button.background:SetTexture()
43 |
44 | button.selectedTexture:SetTexture(E.Media.Textures.Highlight)
45 | button.selectedTexture:SetTexCoord(0, 1, 0, 1)
46 | button.selectedTexture:SetVertexColor(1, .8, .1, .35)
47 | button.selectedTexture:SetAllPoints()
48 |
49 | button.favorite:SetParent(button.backdrop)
50 | end
51 |
52 | for _, button in ipairs(MountJournal.CategoryScrollFrame.buttons) do
53 | button:SetHighlightTexture(E.Media.Textures.Highlight)
54 | button:GetHighlightTexture():SetVertexColor(1, 1, 1)
55 | button:GetHighlightTexture().SetAlpha = E.noop
56 |
57 | button.Background:SetTexture()
58 |
59 | button.Icon:SetDrawLayer("BORDER")
60 | S:HandleIcon(button.Icon)
61 | end
62 |
63 | hooksecurefunc("MountJournal_CategoryDisplayButton", function(button, element)
64 | if element then
65 | button.backdrop:SetShown(element.isCategory)
66 |
67 | local highlight = button:GetHighlightTexture()
68 | highlight:SetTexCoord(0, 1, 0, 1)
69 | highlight:SetAllPoints()
70 | end
71 | end)
72 |
73 | MountJournal.CategoryScrollFrame:StripTextures()
74 | S:HandleScrollBar(MountJournal.CategoryScrollFrame.scrollBar)
75 |
76 | MountJournal.LeftInset:StripTextures()
77 |
78 | MountJournal.RightTopInset:StripTextures()
79 |
80 | MountJournal.RightBottomInset:StripTextures()
81 |
82 | MountJournal.MountCount:StripTextures()
83 |
84 | MountJournal.MountDisplay:StripTextures()
85 |
86 | MountJournal.MountDisplay.ShadowOverlay:Hide()
87 |
88 | S:HandleRotateButton(MountDisplayModelSceneRotateLeftButton)
89 | S:HandleRotateButton(MountDisplayModelSceneRotateRightButton)
90 |
91 | -- Не нашел отдельного метода под ActionButton.
92 | S:HandleItemButton(MountJournal.SummonRandomFavoriteButton)
93 |
94 | S:HandleIcon(MountJournal.MountDisplay.ModelScene.InfoButton.Icon)
95 | S:HandleButton(MountJournal.MountDisplay.ModelScene.buyFrame.buyButton)
96 |
97 | S:HandleButton(MountJournal.MountButton, true)
98 |
99 |
100 |
101 | -- путеводитель
102 | S:HandleButton(MountDisplayModelSceneEJFrameOpenEJButton)
103 | S:HandleButton(PetJournalPetDisplayModelSceneEJFrameOpenEJButton)
104 |
105 | --tab for mount and pet
106 | for i = 1,2 do
107 | S:HandleTab(_G["CollectionsJournalTab"..i])
108 | end
109 |
110 |
111 |
112 | -- pet tab
113 | S:HandleRotateButton(PetJournalPetDisplayModelSceneRotateLeftButton)
114 | S:HandleRotateButton(PetJournalPetDisplayModelSceneRotateRightButton)
115 | S:HandleButton(PetJournalSummonButton, true)
116 |
117 | S:HandleScrollBar(PetJournalListScrollFrameScrollBar)
118 |
119 | PetJournalFilterButton:StripTextures(true)
120 | S:HandleButton(PetJournalFilterButton)
121 |
122 | S:HandleEditBox(PetJournalSearchBox)
123 |
124 |
125 | --pet tab ListScrollFrame
126 | for _, button in ipairs(PetJournal.ListScrollFrame.buttons) do
127 |
128 | button:SetHighlightTexture(E.Media.Textures.Highlight)
129 | button:GetHighlightTexture():SetVertexColor(1, 1, 1)
130 | button:GetHighlightTexture().SetAlpha = E.noop
131 |
132 | button.Background:SetTexture()
133 |
134 | button.Icon:SetDrawLayer("BORDER")
135 | S:HandleIcon(button.Icon)
136 | end
137 |
138 | -- right frame
139 |
140 | PetJournal.LeftInset:StripTextures()
141 | PetJournal.RightInset:StripTextures()
142 | PetJournal.PetDisplay:StripTextures()
143 | PetJournal.PetDisplay.ShadowOverlay:Hide()
144 |
145 |
146 | --pet count
147 | PetJournal.PetCount:StripTextures()
148 |
149 | -- pet icon
150 | S:HandleIcon(PetJournal.PetDisplay.InfoButton.Icon)
151 | end
152 |
153 | S:AddCallback("Skin_Collections", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Spellbook.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.spellbook then return end
11 |
12 | S:HandlePortraitFrame(SpellBookFrame)
13 | SpellBookPage1:SetAlpha(0)
14 | SpellBookPage2:SetAlpha(0)
15 |
16 | for i = 1, 5 do
17 | local tab = _G["SpellBookFrameTabButton"..i]
18 | tab:StripTextures()
19 | S:HandleTab(tab)
20 | tab.backdrop:Point("TOPLEFT", 12, E.PixelMode and -17 or -19)
21 | tab.backdrop:Point("BOTTOMRIGHT", -12, 19)
22 | end
23 |
24 | S:HandleCheckBox(ShowAllSpellRanksCheckBox)
25 | S:HandleCheckBox(ShowUnassignedSpellBorderCheckBox)
26 | ShowUnassignedSpellBorderCheckBox:SetPoint("BOTTOMLEFT", 95, 28)
27 |
28 | S:HandleEditBox(SpellBookSearchBox)
29 |
30 | SpellBookPageText:SetTextColor(1, 1, 1)
31 | SpellBookPageText:SetPoint("BOTTOMRIGHT", -110, 36)
32 | S:HandleNextPrevButton(SpellBookPrevPageButton, nil, nil, true)
33 | SpellBookPrevPageButton:Size(32)
34 | S:HandleNextPrevButton(SpellBookNextPageButton, nil, nil, true)
35 | SpellBookNextPageButton:Size(32)
36 |
37 | for i = 1, 12 do
38 | local button = _G["SpellButton"..i]
39 | local autoCast = _G["SpellButton"..i.."AutocastAutoCastable"]
40 | button:StripTextures()
41 | button:CreateBackdrop("Default", true)
42 |
43 | autoCast:SetOutside(button, 16, 16)
44 |
45 | _G["SpellButton"..i.."IconTexture"]:SetTexCoord(unpack(E.TexCoords))
46 |
47 | E:RegisterCooldown(_G["SpellButton"..i.."Cooldown"])
48 | end
49 |
50 | hooksecurefunc("SpellButton_UpdateButton", function()
51 | for i = 1, 12 do
52 | _G["SpellButton"..i.."SpellName"]:SetTextColor(1, 0.80, 0.10)
53 | _G["SpellButton"..i.."SubSpellName"]:SetTextColor(1, 1, 1)
54 | _G["SpellButton"..i.."Highlight"]:SetTexture(1, 1, 1, 0.3)
55 | end
56 | end)
57 |
58 | for i = 1, 8 do
59 | local button = _G["SpellBookSkillLineTab"..i]
60 | button:GetRegions():SetAlpha(0)
61 | button:SetTemplate()
62 | button:StyleButton(nil, true)
63 |
64 | button:GetNormalTexture():SetInside()
65 | button:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
66 | end
67 |
68 | -- SpellBookCompanionsFrame
69 | SpellBookCompanionsModelFrame:SetAlpha(0)
70 | SpellBookCompanionModelFrame:CreateBackdrop("Transparent")
71 | SpellBookCompanionModelFrameShadowOverlay:SetAlpha(0)
72 |
73 | S:HandleRotateButton(SpellBookCompanionModelFrameRotateLeftButton)
74 | S:HandleRotateButton(SpellBookCompanionModelFrameRotateRightButton)
75 | SpellBookCompanionModelFrameRotateRightButton:SetPoint("TOPLEFT", SpellBookCompanionModelFrameRotateLeftButton, "TOPRIGHT", 3, 0)
76 |
77 | S:HandleButton(SpellBookCompanionSummonButton)
78 |
79 | for i = 1, 12 do
80 | local button = _G["SpellBookCompanionButton"..i]
81 | button:StripTextures()
82 | button:SetTemplate()
83 | button:StyleButton()
84 |
85 | button.IconTexture:SetInside()
86 | button.IconTexture:SetTexCoord(unpack(E.TexCoords))
87 | end
88 |
89 | -- SpellBookProfessionFrame
90 | local function SkinProfessionButton(button)
91 | button:StripTextures()
92 | button:SetTemplate()
93 | button:StyleButton()
94 |
95 | button.iconTexture:SetInside()
96 | button.iconTexture:SetTexCoord(unpack(E.TexCoords))
97 | end
98 |
99 | local function StatusBarColor(self, value)
100 | local _, maxValue = self:GetMinMaxValues()
101 | S:StatusBarColorGradient(self, value, maxValue)
102 | end
103 |
104 | for i = 1, 4 do
105 | local prof = _G["PrimaryProfession"..i]
106 | prof.Missing.missingText:SetTextColor(1, 1, 1)
107 |
108 | SkinProfessionButton(prof.Learn.button2)
109 | SkinProfessionButton(prof.Learn.button1)
110 |
111 |
112 | prof.Learn.statusBar:StripTextures()
113 | prof.Learn.statusBar:Size(188, 12)
114 | prof.Learn.statusBar:CreateBackdrop()
115 | prof.Learn.statusBar:SetStatusBarTexture(E.media.normTex)
116 | E:RegisterStatusBar(prof.Learn.statusBar)
117 | prof.Learn.statusBar.rankText:SetPoint("CENTER")
118 | hooksecurefunc(prof.Learn.statusBar, "SetValue", StatusBarColor)
119 | end
120 |
121 | for i = 1, 3 do
122 | local prof = _G["SecondaryProfession"..i]
123 | prof.Missing.missingText:SetTextColor(1, 1, 1)
124 |
125 | SkinProfessionButton(prof.Learn.button1)
126 | SkinProfessionButton(prof.Learn.button2)
127 |
128 | prof.Learn.statusBar:StripTextures()
129 | prof.Learn.statusBar:Size(123, 12)
130 | prof.Learn.statusBar:Point("TOPLEFT", prof.Learn.rank, "BOTTOMLEFT", 2, -5)
131 | prof.Learn.statusBar:CreateBackdrop()
132 | prof.Learn.statusBar:SetStatusBarTexture(E.media.normTex)
133 | E:RegisterStatusBar(prof.Learn.statusBar)
134 | prof.Learn.statusBar.rankText:SetPoint("CENTER")
135 | hooksecurefunc(prof.Learn.statusBar, "SetValue", StatusBarColor)
136 | end
137 | end
138 |
139 | S:RemoveCallback("Skin_Spellbook")
140 | S:AddCallback("Skin_Spellbook", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Inspect.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local ipairs = ipairs
7 | local unpack = unpack
8 | --WoW API / Variables
9 | local hooksecurefunc = hooksecurefunc
10 |
11 | local function LoadSkin()
12 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.inspect then return end
13 |
14 | S:HandlePortraitFrame(InspectFrame)
15 |
16 | for i = 1, 4 do
17 | S:HandleTab(_G["InspectFrameTab"..i])
18 | end
19 |
20 | -- InspectPaperDollFrame
21 | InspectLevelText:SetPoint("TOP", 0, -20)
22 |
23 | S:HandleButton(InspectPaperDollFrame.ViewButton)
24 |
25 | InspectModelFrame:CreateBackdrop()
26 | InspectModelFrame.backdrop:SetOutside(InspectModelFrameBackgroundOverlay)
27 | InspectModelFrame:DisableDrawLayer("OVERLAY")
28 |
29 | S:HandleControlFrame(InspectModelFrame.controlFrame)
30 |
31 | local slots = {
32 | InspectHeadSlot,
33 | InspectNeckSlot,
34 | InspectShoulderSlot,
35 | InspectBackSlot,
36 | InspectChestSlot,
37 | InspectShirtSlot,
38 | InspectTabardSlot,
39 | InspectWristSlot,
40 | InspectHandsSlot,
41 | InspectWaistSlot,
42 | InspectLegsSlot,
43 | InspectFeetSlot,
44 | InspectFinger0Slot,
45 | InspectFinger1Slot,
46 | InspectTrinket0Slot,
47 | InspectTrinket1Slot,
48 | InspectMainHandSlot,
49 | InspectSecondaryHandSlot,
50 | InspectRangedSlot
51 | }
52 |
53 | for _, slot in ipairs(slots) do
54 | slot:StripTextures()
55 | slot:SetTemplate()
56 | slot:StyleButton()
57 |
58 | slot.icon:SetTexCoord(unpack(E.TexCoords))
59 | slot.icon:SetInside()
60 |
61 | hooksecurefunc(slot.IconBorder, "SetVertexColor", function(_, r, g, b) slot:SetBackdropBorderColor(r, g, b) end)
62 | hooksecurefunc(slot.IconBorder, "Hide", function() slot:SetBackdropBorderColor(unpack(E.media.bordercolor)) end)
63 | end
64 |
65 | -- InspectPVPFrame
66 | for i = 1, 3 do
67 | _G["InspectPVPFrameTab"..i]:StripTextures()
68 | end
69 |
70 | InspectPVPFrame.Service.Inset:StripTextures()
71 |
72 | InspectPVPFrame.Rating.Inset:StripTextures()
73 | InspectPVPFrame.Rating.Container.Background:SetAlpha(0)
74 |
75 | for i = 1, 3 do
76 | _G["InspectPVPTeam"..i]:StripTextures()
77 | _G["InspectPVPTeam"..i]:SetTemplate()
78 | end
79 |
80 | InspectPVPFrame.Statistics.Inset:StripTextures()
81 |
82 | InspectBattlegroundStatisticsScrollFrameScrollBar:StripTextures()
83 | S:HandleScrollBar(InspectBattlegroundStatisticsScrollFrameScrollBar)
84 |
85 | InspectBattlegroundStatisticsScrollFrame:HookScript("OnShow", function()
86 | for i = 1, #InspectBattlegroundStatisticsScrollFrame.buttons do
87 | local button = InspectBattlegroundStatisticsScrollFrame.buttons[i]
88 | if not button.isSkinned then
89 | button:SetTemplate("Transparent")
90 |
91 | button.Background:SetDrawLayer("BORDER")
92 | button.Background:SetInside()
93 | button.Background:SetGradientAlpha("HORIZONTAL", 0, 0, 0, 0, 1, 1, 1, 1)
94 |
95 | S:HandleButton(button.TogglePlus)
96 | button.TogglePlus:SetNormalTexture(E.Media.Textures.Plus)
97 | button.TogglePlus:SetPushedTexture(E.Media.Textures.Plus)
98 | button.TogglePlus:SetHighlightTexture("")
99 | S:HandleButton(button.ToggleMinus)
100 | button.ToggleMinus:SetNormalTexture(E.Media.Textures.Minus)
101 | button.ToggleMinus:SetPushedTexture(E.Media.Textures.Minus)
102 | button.ToggleMinus:SetHighlightTexture("")
103 |
104 | button.isSkinned = true
105 | end
106 | end
107 | end)
108 |
109 | InspectPVPFrame.Ladder.CentralContainer:StripTextures()
110 | InspectPVPFrame.Ladder.CentralContainer.BackgroundOverlay:SetAlpha(0)
111 |
112 | S:HandleScrollBar(InspectPVPFrameLadderCentralContainerScrollFrameScrollBar)
113 |
114 | InspectPVPFrame.Ladder.CentralContainer.ScrollFrame.ShadowOverlay:StripTextures()
115 |
116 | InspectPVPFrame.Ladder.TopContainer.StatisticsFrame:StripTextures()
117 |
118 | for i = 1, 4 do
119 | local tab = InspectPVPFrame.Ladder["RightTab"..i]
120 | tab:SetTemplate()
121 | tab:StyleButton()
122 | tab:GetRegions():Hide()
123 | tab.Icon:SetTexCoord(unpack(E.TexCoords))
124 | tab.Icon:SetInside()
125 | end
126 |
127 | S:HandleButton(InspectPVPFrameToggleStatisticsButton, true)
128 |
129 | -- InspectTalentFrame
130 | for i = 1, 3 do
131 | _G["InspectTalentFrameTab"..i]:StripTextures()
132 | end
133 |
134 | InspectTalentFramePointsBar:StripTextures()
135 |
136 | InspectTalentFrameScrollFrame:StripTextures()
137 | S:HandleScrollBar(InspectTalentFrameScrollFrameScrollBar)
138 |
139 | for i = 1, 40 do
140 | local talent = _G["InspectTalentFrameTalent"..i]
141 | talent:StripTextures()
142 | talent:SetTemplate("Default")
143 | talent:StyleButton()
144 |
145 | talent.icon:SetInside()
146 | talent.icon:SetTexCoord(unpack(E.TexCoords))
147 | talent.icon:SetDrawLayer("ARTWORK")
148 |
149 | talent.Rank:FontTemplate()
150 | end
151 |
152 | -- InspectGuildFrame
153 | InspectGuildFrameBG:SetAlpha(0)
154 | end
155 |
156 | S:AddCallback("Sirus_Inspect", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Custom_Roulette.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | --WoW API / Variables
6 |
7 | local function LoadSkin()
8 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.roulette ~= true then return end
9 |
10 | Custom_RouletteFrame:SetParent(UIParent)
11 | Custom_RouletteFrame:SetScale(1)
12 | Custom_RouletteFrame:SetFrameStrata("HIGH")
13 |
14 | Custom_RouletteFrame:StripTextures(true)
15 | Custom_RouletteFrame:SetTemplate("Transparent")
16 | Custom_RouletteFrame:SetSize(804, 600)
17 |
18 | S:HandleCloseButton(Custom_RouletteFrame.closeButton)
19 |
20 | Custom_RouletteFrame.HeaderFrame.Background:Hide()
21 | Custom_RouletteFrame.HeaderFrame:SetPoint("TOP", 0, 6)
22 | Custom_RouletteFrame.HeaderFrame.TitleText:FontTemplate(nil, 18, "NONE")
23 |
24 | Custom_RouletteFrame.ToggleCurrencyFrame.Background:SetTexture(E.Media.Textures.Highlight)
25 | Custom_RouletteFrame.ToggleCurrencyFrame.Background:SetTexCoord(1, 0, 1, 0)
26 | Custom_RouletteFrame.ToggleCurrencyFrame.Background:SetAlpha(0.3)
27 |
28 | local function OnEnter(button)
29 | button.Text:SetTextColor(1, 1, 1)
30 | end
31 |
32 | local function OnLeave(button)
33 | if not button.active then
34 | button.Text:SetTextColor(unpack(E.media.rgbvaluecolor))
35 | end
36 | end
37 |
38 | local function OnClick(self)
39 | for _, button in pairs(self:GetParent().currencyButtons) do
40 | if button.active then
41 | button.Text:SetTextColor(1, 1, 1)
42 | else
43 | button.Text:SetTextColor(unpack(E.media.rgbvaluecolor))
44 | end
45 | end
46 | end
47 |
48 | local function SkinRouletteCurrencyButto(button)
49 | button.Text:FontTemplate(nil, 14, "NONE")
50 |
51 | if button:GetID() == Custom_RouletteFrame.selectedCurrency then
52 | button.Text:SetTextColor(1, 1, 1)
53 | button.active = true
54 | else
55 | button.Text:SetTextColor(unpack(E.media.rgbvaluecolor))
56 | end
57 |
58 | button:HookScript("OnEnter", OnEnter)
59 | button:HookScript("OnLeave", OnLeave)
60 | button:HookScript("OnClick", OnClick)
61 |
62 | button:SetFrameLevel(Custom_RouletteFrame.ToggleCurrencyFrame:GetFrameLevel() + 3)
63 | end
64 |
65 | SkinRouletteCurrencyButto(Custom_RouletteFrame.ToggleCurrencyFrame.CurrencyBonus)
66 | SkinRouletteCurrencyButto(Custom_RouletteFrame.ToggleCurrencyFrame.CurrencyLuckCoins)
67 |
68 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetSize(200, 48)
69 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:ClearAllPoints()
70 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetPoint("CENTER")
71 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetTexture(E.Media.Textures.Highlight)
72 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetVertexColor(unpack(E.media.rgbvaluecolor))
73 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetTexCoord(1, 0, 1, 0)
74 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector.Selector:SetAlpha(0.5)
75 | Custom_RouletteFrame.ToggleCurrencyFrame.CurrencySelector:SetFrameLevel(Custom_RouletteFrame.ToggleCurrencyFrame:GetFrameLevel() + 1)
76 |
77 | Custom_RouletteFrame.OverlayFrame:SetPoint("CENTER", -2, 140)
78 | Custom_RouletteFrame.OverlayFrame.Background:SetAlpha(0)
79 | Custom_RouletteFrame.OverlayFrame.ArtOverlay:StripTextures()
80 |
81 | S:HandleCheckBox(Custom_RouletteFrameSkipAnimation)
82 |
83 | local lineTexture = Custom_RouletteFrame.OverlayFrame.ArtOverlay:CreateTexture()
84 | lineTexture:Size(3, 122)
85 | lineTexture:SetPoint("CENTER")
86 | lineTexture:SetTexture(0.8, 0, 0)
87 |
88 | Custom_RouletteFrame.SpinButton:StripTextures(true)
89 | Custom_RouletteFrame.SpinButton:SetHeight(48)
90 | Custom_RouletteFrame.SpinButton:SetPoint("CENTER", 0, 44)
91 | S:HandleButton(Custom_RouletteFrame.SpinButton)
92 |
93 | for i = 1, #Custom_RouletteFrame.itemButtons do
94 | local button = Custom_RouletteFrame.itemButtons[i]
95 | button.OverlayFrame.ChildFrame.ItemName:FontTemplate(nil, 12, "NONE")
96 | end
97 |
98 | Custom_RouletteFrame.RewardItemsFrame:SetHeight(304)
99 | Custom_RouletteFrame.RewardItemsFrame.TitleFrame.Background:SetTexture(E.Media.Textures.Highlight)
100 | Custom_RouletteFrame.RewardItemsFrame.TitleFrame.Background:SetTexCoord(1, 0, 1, 0)
101 | Custom_RouletteFrame.RewardItemsFrame.TitleFrame.Background:SetAlpha(0.3)
102 | Custom_RouletteFrame.RewardItemsFrame.TitleFrame.Text:FontTemplate(nil, 16, "NONE")
103 | Custom_RouletteFrame.RewardItemsFrame.TitleFrame.Text:SetTextColor(1, 1, 1)
104 |
105 | for i = 1, #Custom_RouletteFrame.rewardButtons do
106 | local button = Custom_RouletteFrame.rewardButtons[i]
107 | button.Background:SetDrawLayer("BORDER")
108 | button.Background:SetInside()
109 | button.Border:SetAlpha(0)
110 | button:SetTemplate()
111 | button.OverlayFrame.ChildFrame.ItemName:FontTemplate(nil, 12, "NONE")
112 |
113 | local r, g, b = button.Border:GetVertexColor()
114 | button:SetBackdropBorderColor(r, g, b)
115 | end
116 | end
117 |
118 | S:AddCallback("Custom_Roulette", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Settings/Filters/UnitFrame.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 |
3 | --Lua functions
4 | local print = print
5 | --WoW API / Variables
6 | local GetSpellInfo = GetSpellInfo
7 |
8 | local function SpellName(id)
9 | local name = GetSpellInfo(id)
10 | if not name then
11 | print("|cff1784d1ElvUI:|r SpellID is not valid: "..id..". Please check for an updated version, if none exists report to ElvUI author.")
12 | return "Impale"
13 | else
14 | return name
15 | end
16 | end
17 |
18 | local function Defaults(priorityOverride)
19 | return {
20 | enable = true,
21 | priority = priorityOverride or 0,
22 | stackThreshold = 0
23 | }
24 | end
25 |
26 | -- RAID DEBUFFS: This should be pretty self explainitory
27 |
28 | -- Jaina Sirus
29 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306487)] = Defaults() -- Взрывоопасный пламень
30 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306488)] = Defaults() -- Взрывоопасный пламень
31 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306171)] = Defaults() -- Дикое пламя
32 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306499)] = Defaults() -- Яркое пламя
33 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306498)] = Defaults() -- Яркое пламя
34 | G.unitframe.aurafilters.RaidDebuffs.spells[SpellName(306468)] = Defaults() -- Нестабильная магия
35 |
36 | G.unitframe.aurafilters.Blacklist.spells[90001] = Defaults()
37 | G.unitframe.aurafilters.Blacklist.spells[90002] = Defaults()
38 | G.unitframe.aurafilters.Blacklist.spells[90003] = Defaults()
39 | G.unitframe.aurafilters.Blacklist.spells[90004] = Defaults()
40 | G.unitframe.aurafilters.Blacklist.spells[90005] = Defaults()
41 | G.unitframe.aurafilters.Blacklist.spells[90006] = Defaults()
42 | G.unitframe.aurafilters.Blacklist.spells[90007] = Defaults()
43 | G.unitframe.aurafilters.Blacklist.spells[90008] = Defaults()
44 | G.unitframe.aurafilters.Blacklist.spells[90009] = Defaults()
45 | G.unitframe.aurafilters.Blacklist.spells[90010] = Defaults()
46 | G.unitframe.aurafilters.Blacklist.spells[90011] = Defaults()
47 | G.unitframe.aurafilters.Blacklist.spells[90012] = Defaults()
48 | G.unitframe.aurafilters.Blacklist.spells[90013] = Defaults()
49 | G.unitframe.aurafilters.Blacklist.spells[90014] = Defaults()
50 | G.unitframe.aurafilters.Blacklist.spells[90015] = Defaults()
51 | G.unitframe.aurafilters.Blacklist.spells[90016] = Defaults()
52 | G.unitframe.aurafilters.Blacklist.spells[90017] = Defaults()
53 | G.unitframe.aurafilters.Blacklist.spells[90018] = Defaults()
54 | G.unitframe.aurafilters.Blacklist.spells[90019] = Defaults()
55 | G.unitframe.aurafilters.Blacklist.spells[90020] = Defaults()
56 | G.unitframe.aurafilters.Blacklist.spells[90021] = Defaults()
57 | G.unitframe.aurafilters.Blacklist.spells[90022] = Defaults()
58 | G.unitframe.aurafilters.Blacklist.spells[90023] = Defaults()
59 | G.unitframe.aurafilters.Blacklist.spells[90024] = Defaults()
60 | G.unitframe.aurafilters.Blacklist.spells[90025] = Defaults()
61 | G.unitframe.aurafilters.Blacklist.spells[90026] = Defaults()
62 | G.unitframe.aurafilters.Blacklist.spells[90027] = Defaults()
63 | G.unitframe.aurafilters.Blacklist.spells[90028] = Defaults()
64 | G.unitframe.aurafilters.Blacklist.spells[90029] = Defaults()
65 | G.unitframe.aurafilters.Blacklist.spells[90030] = Defaults()
66 | G.unitframe.aurafilters.Blacklist.spells[90031] = Defaults()
67 | G.unitframe.aurafilters.Blacklist.spells[90032] = Defaults()
68 | G.unitframe.aurafilters.Blacklist.spells[90033] = Defaults()
69 | G.unitframe.aurafilters.Blacklist.spells[90034] = Defaults()
70 | G.unitframe.aurafilters.Blacklist.spells[90035] = Defaults()
71 | G.unitframe.aurafilters.Blacklist.spells[90036] = Defaults()
72 |
73 | G.unitframe.aurafilters.Blacklist.spells[302100] = Defaults()
74 | G.unitframe.aurafilters.Blacklist.spells[302100] = Defaults()
75 | G.unitframe.aurafilters.Blacklist.spells[302101] = Defaults()
76 | G.unitframe.aurafilters.Blacklist.spells[302102] = Defaults()
77 | G.unitframe.aurafilters.Blacklist.spells[302103] = Defaults()
78 | G.unitframe.aurafilters.Blacklist.spells[302104] = Defaults()
79 | G.unitframe.aurafilters.Blacklist.spells[302105] = Defaults()
80 | G.unitframe.aurafilters.Blacklist.spells[302106] = Defaults()
81 | G.unitframe.aurafilters.Blacklist.spells[302107] = Defaults()
82 |
83 | G.unitframe.aurafilters.Blacklist.spells[90039] = Defaults()
84 | G.unitframe.aurafilters.Blacklist.spells[90040] = Defaults()
85 | G.unitframe.aurafilters.Blacklist.spells[90041] = Defaults()
86 | G.unitframe.aurafilters.Blacklist.spells[90042] = Defaults()
87 | G.unitframe.aurafilters.Blacklist.spells[90043] = Defaults()
88 | G.unitframe.aurafilters.Blacklist.spells[90044] = Defaults()
89 | G.unitframe.aurafilters.Blacklist.spells[90045] = Defaults()
90 | G.unitframe.aurafilters.Blacklist.spells[308221] = Defaults()
91 | G.unitframe.aurafilters.Blacklist.spells[308222] = Defaults()
92 | G.unitframe.aurafilters.Blacklist.spells[308223] = Defaults()
93 | G.unitframe.aurafilters.Blacklist.spells[308224] = Defaults()
94 | G.unitframe.aurafilters.Blacklist.spells[308225] = Defaults()
95 | G.unitframe.aurafilters.Blacklist.spells[308226] = Defaults()
96 | G.unitframe.aurafilters.Blacklist.spells[308227] = Defaults()
97 |
98 | G.unitframe.aurafilters.Blacklist.spells[90037] = Defaults()
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Nameplates/Elements/CastBar.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local NP = E:GetModule("NamePlates")
3 |
4 | --Lua functions
5 | local unpack = unpack
6 | local abs = math.abs
7 | --WoW API / Variables
8 | local CreateFrame = CreateFrame
9 |
10 | function NP:UpdateElement_CastBarOnValueChanged(value)
11 | local frame = self:GetParent()
12 | local min, max = self:GetMinMaxValues()
13 | local unitFrame = frame.UnitFrame
14 | local isChannel = value < unitFrame.CastBar:GetValue()
15 |
16 | unitFrame.CastBar.value = value
17 | unitFrame.CastBar.max = max
18 | unitFrame.CastBar:SetMinMaxValues(min, max)
19 | unitFrame.CastBar:SetValue(value)
20 |
21 | if isChannel then
22 | if unitFrame.CastBar.channelTimeFormat == "CURRENT" then
23 | unitFrame.CastBar.Time:SetFormattedText("%.1f", abs(unitFrame.CastBar.value - unitFrame.CastBar.max))
24 | elseif unitFrame.CastBar.channelTimeFormat == "CURRENTMAX" then
25 | unitFrame.CastBar.Time:SetFormattedText("%.1f / %.2f", abs(unitFrame.CastBar.value - unitFrame.CastBar.max), unitFrame.CastBar.max)
26 | elseif unitFrame.CastBar.channelTimeFormat == "REMAINING" then
27 | unitFrame.CastBar.Time:SetFormattedText("%.1f", unitFrame.CastBar.value)
28 | elseif unitFrame.CastBar.channelTimeFormat == "REMAININGMAX" then
29 | unitFrame.CastBar.Time:SetFormattedText("%.1f / %.2f", unitFrame.CastBar.value, unitFrame.CastBar.max)
30 | end
31 | else
32 | if unitFrame.CastBar.castTimeFormat == "CURRENT" then
33 | unitFrame.CastBar.Time:SetFormattedText("%.1f", unitFrame.CastBar.value)
34 | elseif unitFrame.CastBar.castTimeFormat == "CURRENTMAX" then
35 | unitFrame.CastBar.Time:SetFormattedText("%.1f / %.2f", unitFrame.CastBar.value, unitFrame.CastBar.max)
36 | elseif unitFrame.CastBar.castTimeFormat == "REMAINING" then
37 | unitFrame.CastBar.Time:SetFormattedText("%.1f", abs(unitFrame.CastBar.value - unitFrame.CastBar.max))
38 | elseif unitFrame.CastBar.castTimeFormat == "REMAININGMAX" then
39 | unitFrame.CastBar.Time:SetFormattedText("%.1f / %.2f", abs(unitFrame.CastBar.value - unitFrame.CastBar.max), unitFrame.CastBar.max)
40 | end
41 | end
42 |
43 | local unit = unitFrame.unit or unitFrame.UnitName
44 | if unit then
45 | local spell, _, spellName = UnitCastingInfo(unit)
46 | if not spell then
47 | _, _, spellName = UnitChannelInfo(unit)
48 | end
49 |
50 | unitFrame.CastBar.Name:SetText(spellName)
51 | else
52 | unitFrame.CastBar.Name:SetText()
53 | end
54 |
55 | unitFrame.CastBar.Icon.texture:SetTexture(self.Icon:GetTexture())
56 |
57 | if not self.Shield:IsShown() then
58 | unitFrame.CastBar:SetStatusBarColor(NP.db.colors.castColor.r, NP.db.colors.castColor.g, NP.db.colors.castColor.b)
59 | unitFrame.CastBar.Icon.texture:SetDesaturated(false)
60 | else
61 | unitFrame.CastBar:SetStatusBarColor(NP.db.colors.castNoInterruptColor.r, NP.db.colors.castNoInterruptColor.g, NP.db.colors.castNoInterruptColor.b)
62 |
63 | if NP.db.colors.castbarDesaturate then
64 | unitFrame.CastBar.Icon.texture:SetDesaturated(true)
65 | end
66 | end
67 |
68 | NP:StyleFilterUpdate(unitFrame, "FAKE_Casting")
69 | end
70 |
71 | function NP:UpdateElement_CastBarOnShow()
72 | local parent = self:GetParent()
73 | local unitFrame = parent.UnitFrame
74 | if not unitFrame.UnitType then
75 | return
76 | end
77 |
78 | if NP.db.units[unitFrame.UnitType].castbar.enable ~= true then return end
79 | if not unitFrame.Health:IsShown() then return end
80 |
81 | if unitFrame.CastBar then
82 | unitFrame.CastBar:Show()
83 |
84 | NP:StyleFilterUpdate(unitFrame, "FAKE_Casting")
85 | end
86 | end
87 |
88 | function NP:UpdateElement_CastBarOnHide()
89 | local parent = self:GetParent()
90 | if parent.UnitFrame.CastBar then
91 | parent.UnitFrame.CastBar:Hide()
92 |
93 | NP:StyleFilterUpdate(parent.UnitFrame, "FAKE_Casting")
94 | end
95 | end
96 |
97 | function NP:Construct_CastBar(parent)
98 | local frame = CreateFrame("StatusBar", "$parentCastBar", parent)
99 | NP:StyleFrame(frame)
100 |
101 | frame.Icon = CreateFrame("Frame", nil, frame)
102 | frame.Icon.texture = frame.Icon:CreateTexture(nil, "BORDER")
103 | frame.Icon.texture:SetAllPoints()
104 | frame.Icon.texture:SetTexCoord(unpack(E.TexCoords))
105 | NP:StyleFrame(frame.Icon)
106 |
107 | frame.Time = frame:CreateFontString(nil, "OVERLAY")
108 | frame.Time:SetJustifyH("RIGHT")
109 | frame.Time:SetWordWrap(false)
110 |
111 | frame.Name = frame:CreateFontString(nil, "OVERLAY")
112 | frame.Name:SetJustifyH("LEFT")
113 | frame.Name:SetWordWrap(false)
114 |
115 | frame.Spark = frame:CreateTexture(nil, "OVERLAY")
116 | frame.Spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
117 | frame.Spark:SetBlendMode("ADD")
118 | frame.Spark:SetSize(15, 15)
119 |
120 | frame.holdTime = 0
121 | frame.interrupted = nil
122 |
123 | frame.scale = CreateAnimationGroup(frame)
124 | frame.scale.width = frame.scale:CreateAnimation("Width")
125 | frame.scale.width:SetDuration(0.2)
126 | frame.scale.height = frame.scale:CreateAnimation("Height")
127 | frame.scale.height:SetDuration(0.2)
128 |
129 | frame.Icon.scale = CreateAnimationGroup(frame.Icon)
130 | frame.Icon.scale.width = frame.Icon.scale:CreateAnimation("Width")
131 | frame.Icon.scale.width:SetDuration(0.2)
132 | frame.Icon.scale.height = frame.Icon.scale:CreateAnimation("Height")
133 | frame.Icon.scale.height:SetDuration(0.2)
134 |
135 | frame:Hide()
136 |
137 | return frame
138 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/WatchFrame.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | local format = string.format
8 | --WoW API / Variables
9 | local GetNumQuestWatches = GetNumQuestWatches
10 | local GetQuestDifficultyColor = GetQuestDifficultyColor
11 | local GetQuestIndexForWatch = GetQuestIndexForWatch
12 | local GetQuestLogTitle = GetQuestLogTitle
13 | local hooksecurefunc = hooksecurefunc
14 |
15 | local function LoadSkin()
16 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.watchframe then return end
17 |
18 | -- WatchFrame Header
19 | WatchFrame.BlocksFrame.QuestHeader:StripTextures()
20 | WatchFrame.BlocksFrame.AchievementHeader:StripTextures()
21 |
22 | -- WatchFrame Expand/Collapse Button
23 | WatchFrameHeaderMinimizeButton:StripTextures()
24 | WatchFrameHeaderMinimizeButton.tex = WatchFrameHeaderMinimizeButton:CreateTexture(nil, "OVERLAY")
25 | WatchFrameHeaderMinimizeButton.tex:SetTexture(E.Media.Textures.MinusButton)
26 | WatchFrameHeaderMinimizeButton.tex:SetInside()
27 | WatchFrameHeaderMinimizeButton:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight", "ADD")
28 | WatchFrameHeaderMinimizeButton:SetFrameStrata("MEDIUM")
29 |
30 | hooksecurefunc("WatchFrame_Expand", function()
31 | WatchFrameHeaderMinimizeButton.tex:SetTexture(E.Media.Textures.MinusButton)
32 |
33 | WatchFrame:Width(WATCHFRAME_EXPANDEDWIDTH)
34 | end)
35 |
36 | hooksecurefunc("WatchFrame_Collapse", function()
37 | WatchFrameHeaderMinimizeButton.tex:SetTexture(E.Media.Textures.PlusButton)
38 |
39 | WatchFrame:Width(WATCHFRAME_EXPANDEDWIDTH)
40 | end)
41 |
42 | -- WatchFrame Text
43 | hooksecurefunc("WatchFrame_Update", function()
44 | local questIndex, title, level, color
45 |
46 | for i = 1, GetNumQuestWatches() do
47 | questIndex = GetQuestIndexForWatch(i)
48 | if questIndex then
49 | title, level = GetQuestLogTitle(questIndex)
50 | color = GetQuestDifficultyColor(level)
51 |
52 | for j = 1, #WATCHFRAME_QUESTLINES do
53 | if WATCHFRAME_QUESTLINES[j].text:GetText() == title then
54 | WATCHFRAME_QUESTLINES[j].text:SetTextColor(color.r, color.g, color.b)
55 | WATCHFRAME_QUESTLINES[j].color = color
56 | end
57 | end
58 | end
59 | end
60 |
61 | for i = 1, #WATCHFRAME_ACHIEVEMENTLINES do
62 | WATCHFRAME_ACHIEVEMENTLINES[i].color = nil
63 | end
64 |
65 | -- WatchFrame Items
66 | for i = 1, WATCHFRAME_NUM_ITEMS do
67 | local button = _G["WatchFrameItem"..i]
68 |
69 | if button and not button.isSkinned then
70 | local icon = _G["WatchFrameItem"..i.."IconTexture"]
71 | local normal = _G["WatchFrameItem"..i.."NormalTexture"]
72 | local cooldown = _G["WatchFrameItem"..i.."Cooldown"]
73 |
74 | button:CreateBackdrop()
75 | button.backdrop:SetAllPoints()
76 | button:StyleButton()
77 | button:Size(25)
78 |
79 | normal:SetAlpha(0)
80 |
81 | icon:SetInside()
82 | icon:SetTexCoord(unpack(E.TexCoords))
83 |
84 | E:RegisterCooldown(cooldown)
85 |
86 | button.isSkinned = true
87 | end
88 | end
89 | end)
90 |
91 | -- WatchFrame Highlight
92 | hooksecurefunc("WatchFrameLinkButtonTemplate_Highlight", function(self, onEnter)
93 | local line
94 |
95 | for index = self.startLine, self.lastLine do
96 | line = self.lines[index]
97 |
98 | if line then
99 | if index == self.startLine then
100 | if onEnter then
101 | line.text:SetTextColor(1, 0.80, 0.10)
102 | else
103 | if line.color then
104 | line.text:SetTextColor(line.color.r, line.color.g, line.color.b)
105 | else
106 | line.text:SetTextColor(0.75, 0.61, 0)
107 | end
108 | end
109 | end
110 | end
111 | end
112 | end)
113 |
114 | -- WatchFrame POI Buttons
115 | local function poi_OnEnter(self)
116 | self.bg:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor))
117 | end
118 |
119 | local function poi_OnLeave(self)
120 | self.bg:SetBackdropBorderColor(unpack(E.media.bordercolor))
121 | end
122 |
123 | hooksecurefunc("QuestPOI_DisplayButton", function(parentName, buttonType, buttonIndex)
124 | local poiButton = _G[format("poi%s%s_%d", parentName, buttonType, buttonIndex)]
125 |
126 | if poiButton and parentName == "WatchFrameLines" then
127 | if not poiButton.isSkinned then
128 | poiButton.normalTexture:SetTexture("")
129 | poiButton.pushedTexture:SetTexture("")
130 | poiButton.highlightTexture:SetTexture("")
131 | poiButton.selectionGlow:SetTexture("")
132 |
133 | poiButton:SetScale(0.8)
134 | poiButton:SetHitRectInsets(6, 6, 6, 6)
135 |
136 | poiButton.bg = CreateFrame("Frame", nil, poiButton)
137 | poiButton.bg:SetTemplate("Default", true)
138 | poiButton.bg:Point("TOPLEFT", 6, -6)
139 | poiButton.bg:Point("BOTTOMRIGHT", -6, 6)
140 | poiButton.bg:SetFrameLevel(poiButton.bg:GetFrameLevel() - 1)
141 |
142 | poiButton:HookScript("OnEnter", poi_OnEnter)
143 | poiButton:HookScript("OnLeave", poi_OnLeave)
144 |
145 | poiButton.isSkinned = true
146 | end
147 | end
148 | end)
149 |
150 | hooksecurefunc("QuestPOI_SelectButton", function(poiButton)
151 | if poiButton and poiButton.bg then
152 | poiButton.bg:SetBackdropColor(unpack(E.media.rgbvaluecolor))
153 | end
154 | end)
155 |
156 | hooksecurefunc("QuestPOI_DeselectButton", function(poiButton)
157 | if poiButton and poiButton.bg then
158 | poiButton.bg:SetBackdropColor(unpack(E.media.backdropcolor))
159 | end
160 | end)
161 | end
162 |
163 | S:RemoveCallback("Skin_WatchFrame")
164 | S:AddCallback("Skin_WatchFrame", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataBars/Honor.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local DB = E:GetModule("DataBars")
3 | local LSM = E.Libs.LSM
4 |
5 | local format = format
6 | local UnitIsPVP = UnitIsPVP
7 | local CreateFrame = CreateFrame
8 | local InCombatLockdown = InCombatLockdown
9 | local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL
10 |
11 | function DB:UpdateHonor(event, unit)
12 | if not DB.db.honor.enable then return end
13 | if (event == "PLAYER_FLAGS_CHANGED" or event == "UNIT_FACTION") and unit ~= "player" then return end
14 |
15 | local bar = DB.honorBar
16 |
17 | if (DB.db.honor.hideInCombat and (event == "PLAYER_REGEN_DISABLED" or InCombatLockdown())) or
18 | (DB.db.honor.hideOutsidePvP and not UnitIsPVP("player")) or (DB.db.honor.hideBelowMaxLevel and E.mylevel < MAX_PLAYER_LEVEL) then
19 | bar:Hide()
20 | else
21 | bar:Show()
22 |
23 | if DB.db.honor.hideInVehicle then
24 | E:RegisterObjectForVehicleLock(bar, E.UIParent)
25 | else
26 | E:UnregisterObjectForVehicleLock(bar)
27 | end
28 |
29 | local _, _, _, _, cur, _, _, _, max = GetRatedBattlegroundRankInfo()
30 |
31 | --Guard against division by zero, which appears to be an issue when zoning in/out of dungeons
32 | if max == 0 then max = 1 end
33 |
34 | bar.statusBar:SetMinMaxValues(0, max)
35 | bar.statusBar:SetValue(cur)
36 |
37 | local text = ""
38 | local textFormat = DB.db.honor.textFormat
39 |
40 | if textFormat == "PERCENT" then
41 | text = format("%d%%", cur / max * 100)
42 | elseif textFormat == "CURMAX" then
43 | text = format("%s - %s", E:ShortValue(cur), E:ShortValue(max))
44 | elseif textFormat == "CURPERC" then
45 | text = format("%s - %d%%", E:ShortValue(cur), cur / max * 100)
46 | elseif textFormat == "CUR" then
47 | text = format("%s", E:ShortValue(cur))
48 | elseif textFormat == "REM" then
49 | text = format("%s", E:ShortValue(max - cur))
50 | elseif textFormat == "CURREM" then
51 | text = format("%s - %s", E:ShortValue(cur), E:ShortValue(max - cur))
52 | elseif textFormat == "CURPERCREM" then
53 | text = format("%s - %d%% (%s)", E:ShortValue(cur), cur / max * 100, E:ShortValue(max - cur))
54 | end
55 |
56 | bar.text:SetText(text)
57 | end
58 | end
59 |
60 | function DB:HonorBar_OnEnter()
61 | if DB.db.honor.mouseover then
62 | E:UIFrameFadeIn(self, 0.4, self:GetAlpha(), 1)
63 | end
64 |
65 | GameTooltip:ClearLines()
66 | GameTooltip:SetOwner(self, "ANCHOR_CURSOR", 0, -4)
67 |
68 | local currTitle, _, level, _, cur, _, _, _, max = GetRatedBattlegroundRankInfo()
69 |
70 | GameTooltip:AddLine(PVP_TAB_SERVICES)
71 |
72 | GameTooltip:AddDoubleLine(PVP_YOUR_RATING..":", format(RBG_SCORE_TOOLTIP_RANK, currTitle, level), 1, 1, 1)
73 |
74 | if level < 14 then
75 | GameTooltip:AddLine(" ")
76 |
77 | GameTooltip:AddDoubleLine(RATED_BATTLEGROUND_TOOLTIP_NEXTRANK, format(" %d / %d (%d%%)", cur, max, cur/max * 100), 1, 1, 1)
78 | GameTooltip:AddDoubleLine(L["Remaining:"], format(" %d (%d%% - %d "..L["Bars"]..")", max - cur, (max - cur) / max * 100, 20 * (max - cur) / max), 1, 1, 1)
79 | end
80 |
81 | GameTooltip:Show()
82 | end
83 |
84 | function DB:HonorBar_OnClick()
85 | TogglePVPUIFrame()
86 | end
87 |
88 | function DB:UpdateHonorDimensions()
89 | self.honorBar:SetWidth(self.db.honor.width)
90 | self.honorBar:SetHeight(self.db.honor.height)
91 | self.honorBar.statusBar:SetOrientation(self.db.honor.orientation)
92 | self.honorBar.text:FontTemplate(LSM:Fetch("font", self.db.honor.font), self.db.honor.textSize, self.db.honor.fontOutline)
93 |
94 | if DB.db.honor.orientation == "HORIZONTAL" then
95 | self.honorBar.statusBar:SetRotatesTexture(false)
96 | else
97 | self.honorBar.statusBar:SetRotatesTexture(true)
98 | end
99 |
100 | if self.db.honor.mouseover then
101 | self.honorBar:SetAlpha(0)
102 | else
103 | self.honorBar:SetAlpha(1)
104 | end
105 | end
106 |
107 | function DB:EnableDisable_HonorBar()
108 | if self.db.honor.enable then
109 | self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateHonor")
110 | self:RegisterEvent("UNIT_FACTION", "UpdateHonor")
111 | self:UpdateHonor()
112 | E:EnableMover(self.honorBar.mover:GetName())
113 | else
114 | self:UnregisterEvent("PLAYER_ENTERING_WORLD")
115 | self:UnregisterEvent("UNIT_FACTION")
116 | self.honorBar:Hide()
117 | E:DisableMover(self.honorBar.mover:GetName())
118 | end
119 | end
120 |
121 | function DB:LoadHonorBar()
122 | self.honorBar = self:CreateBar("ElvUI_HonorBar", self.HonorBar_OnEnter, self.HonorBar_OnClick, "RIGHT", self.repBar, "LEFT", E.Border - E.Spacing*3, 0)
123 | self.honorBar.statusBar:SetStatusBarColor(240/255, 114/255, 65/255)
124 | self.honorBar.statusBar:SetMinMaxValues(0, 325)
125 |
126 | self.honorBar.eventFrame = CreateFrame("Frame")
127 | self.honorBar.eventFrame:Hide()
128 | self.honorBar.eventFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
129 | self.honorBar.eventFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
130 | self.honorBar.eventFrame:RegisterEvent("PLAYER_FLAGS_CHANGED")
131 | self.honorBar.eventFrame:SetScript("OnEvent", function(_, event, unit) self:UpdateHonor(event, unit) end)
132 |
133 | self:UpdateHonorDimensions()
134 | E:CreateMover(self.honorBar, "HonorBarMover", PVP_TAB_SERVICES, nil, nil, nil, nil, nil, "databars,honor")
135 |
136 | self:EnableDisable_HonorBar()
137 | end
138 |
139 | hooksecurefunc(DB, "Initialize", function()
140 | DB:LoadHonorBar()
141 | end)
142 |
143 | -- Temp
144 | function DB:OnLeave()
145 | if (self == ElvUI_ExperienceBar and DB.db.experience.mouseover) or (self == ElvUI_ReputationBar and DB.db.reputation.mouseover) or (self == ElvUI_HonorBar and DB.db.honor.mouseover) then
146 | E:UIFrameFadeOut(self, 1, self:GetAlpha(), 0)
147 | end
148 | GameTooltip:Hide()
149 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/ActionBars/MicroBar.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local AB = E:GetModule("ActionBars")
3 |
4 | --Lua functions
5 | local _G = _G
6 | --WoW API / Variables
7 | local CreateFrame = CreateFrame
8 | local InCombatLockdown = InCombatLockdown
9 | local RegisterStateDriver = RegisterStateDriver
10 |
11 | local MICRO_BUTTONS = SHARED_MICROMENU_BUTTONS
12 |
13 | if E.private.actionbar.enable then
14 | for _, frame in pairs({"ShapeshiftBarFrame", "PossessBarFrame", "PETACTIONBAR_YPOS", "MULTICASTACTIONBAR_YPOS", "MultiBarBottomLeft", "MultiCastActionBarFrame"}) do
15 | if UIPARENT_MANAGED_FRAME_POSITIONS[frame] then
16 | UIPARENT_MANAGED_FRAME_POSITIONS[frame].ignoreFramePositionManager = true
17 | end
18 | end
19 | end
20 |
21 | local function onEnter()
22 | if AB.db.microbar.mouseover then
23 | E:UIFrameFadeIn(ElvUI_MicroBar, 0.2, ElvUI_MicroBar:GetAlpha(), AB.db.microbar.alpha)
24 | end
25 | end
26 |
27 | local function onLeave()
28 | if AB.db.microbar.mouseover then
29 | E:UIFrameFadeOut(ElvUI_MicroBar, 0.2, ElvUI_MicroBar:GetAlpha(), 0)
30 | end
31 | end
32 |
33 | function AB:HandleMicroButton(button)
34 | local pushed = button:GetPushedTexture()
35 | local normal = button:GetNormalTexture()
36 | local disabled = button:GetDisabledTexture()
37 |
38 | local f = CreateFrame("Frame", nil, button)
39 | f:SetFrameLevel(button:GetFrameLevel() - 1)
40 | f:SetTemplate("Default", true)
41 | f:SetOutside(button)
42 | button.backdrop = f
43 |
44 | button:SetParent(ElvUI_MicroBar)
45 | button:GetHighlightTexture():Kill()
46 | button:HookScript("OnEnter", onEnter)
47 | button:HookScript("OnLeave", onLeave)
48 | button:SetHitRectInsets(0, 0, 0, 0)
49 |
50 | pushed:SetTexCoord(0.17, 0.87, 0.5, 0.908)
51 | pushed:SetInside(f)
52 |
53 | normal:SetTexCoord(0.17, 0.87, 0.5, 0.908)
54 | normal:SetInside(f)
55 |
56 | if disabled then
57 | disabled:SetTexCoord(0.17, 0.87, 0.5, 0.908)
58 | disabled:SetInside(f)
59 | end
60 | end
61 |
62 | function AB:UpdateMicroButtonsParent()
63 | if CharacterMicroButton:GetParent() == ElvUI_MicroBar then return end
64 |
65 | for i = 1, #MICRO_BUTTONS do
66 | _G[MICRO_BUTTONS[i]]:SetParent(ElvUI_MicroBar)
67 | end
68 | end
69 |
70 | function AB:UpdateMicroBarVisibility()
71 | if InCombatLockdown() then
72 | AB.NeedsUpdateMicroBarVisibility = true
73 | self:RegisterEvent("PLAYER_REGEN_ENABLED")
74 | return
75 | end
76 |
77 | local visibility = self.db.microbar.visibility
78 | if visibility and visibility:match("[\n\r]") then
79 | visibility = visibility:gsub("[\n\r]", "")
80 | end
81 |
82 | RegisterStateDriver(ElvUI_MicroBar.visibility, "visibility", (self.db.microbar.enabled and visibility) or "hide")
83 | end
84 |
85 | function AB:UpdateMicroPositionDimensions()
86 | if not ElvUI_MicroBar then return end
87 |
88 | local numRows = 1
89 | local prevButton = ElvUI_MicroBar
90 | local offset = E:Scale(E.PixelMode and 1 or 3)
91 | local spacing = E:Scale(offset + self.db.microbar.buttonSpacing)
92 |
93 | for i = 1, #MICRO_BUTTONS do
94 | local button = _G[MICRO_BUTTONS[i]]
95 | local lastColumnButton = i - self.db.microbar.buttonsPerRow
96 | lastColumnButton = _G[MICRO_BUTTONS[lastColumnButton]]
97 |
98 | button:Size(self.db.microbar.buttonSize, self.db.microbar.buttonSize * 1.4)
99 | button:ClearAllPoints()
100 |
101 | if prevButton == ElvUI_MicroBar then
102 | button:Point("TOPLEFT", prevButton, "TOPLEFT", offset, -offset)
103 | elseif (i - 1) % self.db.microbar.buttonsPerRow == 0 then
104 | button:Point("TOP", lastColumnButton, "BOTTOM", 0, -spacing)
105 | numRows = numRows + 1
106 | else
107 | button:Point("LEFT", prevButton, "RIGHT", spacing, 0)
108 | end
109 |
110 | prevButton = button
111 | end
112 |
113 | if AB.db.microbar.mouseover and not ElvUI_MicroBar:IsMouseOver() then
114 | ElvUI_MicroBar:SetAlpha(0)
115 | else
116 | ElvUI_MicroBar:SetAlpha(self.db.microbar.alpha)
117 | end
118 |
119 | AB.MicroWidth = (((_G["CharacterMicroButton"]:GetWidth() + spacing) * self.db.microbar.buttonsPerRow) - spacing) + (offset * 2)
120 | AB.MicroHeight = (((_G["CharacterMicroButton"]:GetHeight() + spacing) * numRows) - spacing) + (offset * 2)
121 | ElvUI_MicroBar:Size(AB.MicroWidth, AB.MicroHeight)
122 |
123 | if ElvUI_MicroBar.mover then
124 | if self.db.microbar.enabled then
125 | E:EnableMover(ElvUI_MicroBar.mover:GetName())
126 | else
127 | E:DisableMover(ElvUI_MicroBar.mover:GetName())
128 | end
129 | end
130 |
131 | self:UpdateMicroBarVisibility()
132 | end
133 |
134 | function AB:UpdateMicroButtons()
135 | self:UpdateMicroPositionDimensions()
136 | GuildMicroButtonTabard:SetPoint("TOPLEFT", -5, 24)
137 | end
138 |
139 | function AB:SetupMicroBar()
140 | local microBar = CreateFrame("Frame", "ElvUI_MicroBar", E.UIParent)
141 | microBar:Point("TOPLEFT", E.UIParent, "TOPLEFT", 4, -48)
142 | microBar:EnableMouse(true)
143 | microBar:SetScript("OnEnter", onEnter)
144 | microBar:SetScript("OnLeave", onLeave)
145 |
146 | microBar.visibility = CreateFrame('Frame', nil, E.UIParent, "SecureHandlerStateTemplate")
147 | microBar.visibility:SetScript("OnShow", function() microBar:Show() end)
148 | microBar.visibility:SetScript("OnHide", function() microBar:Hide() end)
149 |
150 | for i = 1, #MICRO_BUTTONS do
151 | self:HandleMicroButton(_G[MICRO_BUTTONS[i]])
152 | end
153 |
154 | MicroButtonPortrait:SetInside(CharacterMicroButton.backdrop)
155 |
156 | self:SecureHook("VehicleMenuBar_MoveMicroButtons", "UpdateMicroButtonsParent")
157 | self:SecureHook("UpdateMicroButtons")
158 |
159 | self:UpdateMicroPositionDimensions()
160 |
161 | E:CreateMover(microBar, "MicrobarMover", L["Micro Bar"], nil, nil, nil, "ALL,ACTIONBARS", nil, "actionbar,microbar")
162 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Help.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local select = select
7 | --WoW API / Variables
8 |
9 | local function LoadSkin()
10 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.help then return end
11 |
12 | HelpFrame:StripTextures()
13 | HelpFrame:CreateBackdrop("Transparent")
14 | HelpFrame.backdrop:Point("TOPLEFT", 6, 0)
15 | HelpFrame.backdrop:Point("BOTTOMRIGHT", -45, 14)
16 |
17 | S:SetBackdropHitRect(HelpFrame)
18 |
19 | S:HandleCloseButton(HelpFrameCloseButton, HelpFrame.backdrop)
20 |
21 | local helpFrameButtons = {
22 | "GMTalkOpenTicket",
23 | "GMTalkCancel",
24 | "ReportIssueOpenTicket",
25 | "ReportIssueCancel",
26 | -- "LagLoot",
27 | -- "LagAuctionHouse",
28 | -- "LagMail",
29 | -- "LagChat",
30 | -- "LagMovement",
31 | -- "LagSpell",
32 | -- "LagCancel",
33 | "StuckStuck",
34 | "StuckOpenTicket",
35 | "StuckCancel",
36 | "OpenTicketCancel",
37 | "OpenTicketSubmit",
38 | "ViewResponseCancel",
39 | "ViewResponseMoreHelp",
40 | "ViewResponseIssueResolved",
41 | "WelcomeGMTalk",
42 | "WelcomeReportIssue",
43 | "WelcomeStuck",
44 | "WelcomeCancel"
45 | }
46 |
47 | for i = 1, #helpFrameButtons do
48 | S:HandleButton(_G["HelpFrame"..helpFrameButtons[i]])
49 | end
50 |
51 | KnowledgeBaseFrameDivider:StripTextures()
52 | KnowledgeBaseFrameDivider2:StripTextures()
53 | HelpFrameOpenTicketDivider:StripTextures()
54 | HelpFrameViewResponseDivider:StripTextures()
55 |
56 | local scrollBars = {
57 | "HelpFrameOpenTicketScrollFrameScrollBar",
58 | "HelpFrameViewResponseIssueScrollFrameScrollBar",
59 | "HelpFrameViewResponseMessageScrollFrameScrollBar",
60 | }
61 |
62 | for _, scrollBar in ipairs(scrollBars) do
63 | S:HandleScrollBar(_G[scrollBar])
64 | _G[scrollBar.."Top"]:Hide()
65 | _G[scrollBar.."Middle"]:Hide()
66 | _G[scrollBar.."Bottom"]:Hide()
67 | end
68 |
69 | HelpFrameViewResponseIssueScrollFrame:CreateBackdrop("Transparent")
70 | HelpFrameViewResponseIssueScrollFrame.backdrop:Point("TOPLEFT", -2, 2)
71 | HelpFrameViewResponseIssueScrollFrame.backdrop:Point("BOTTOMRIGHT", 2, -2)
72 |
73 | HelpFrameViewResponseMessageScrollFrame:CreateBackdrop("Transparent")
74 | HelpFrameViewResponseMessageScrollFrame.backdrop:Point("TOPLEFT", -2, 2)
75 | HelpFrameViewResponseMessageScrollFrame.backdrop:Point("BOTTOMRIGHT", 2, -2)
76 |
77 | KnowledgeBaseFrame:StripTextures()
78 |
79 | KnowledgeBaseFrame:HookScript("OnShow", function()
80 | select(8, HelpFrame:GetRegions()):Hide()
81 | end)
82 |
83 | KnowledgeBaseFrame:SetScript("OnHide", function()
84 | select(8, HelpFrame:GetRegions()):Show()
85 | end)
86 |
87 | S:HandleButton(GMChatOpenLog)
88 | S:HandleButton(KnowledgeBaseFrameTopIssuesButton)
89 |
90 | S:HandleEditBox(KnowledgeBaseFrameEditBox)
91 | S:HandleDropDownBox(KnowledgeBaseFrameCategoryDropDown)
92 | S:HandleDropDownBox(KnowledgeBaseFrameSubCategoryDropDown)
93 | S:HandleButton(KnowledgeBaseFrameSearchButton)
94 |
95 | S:HandleNextPrevButton(KnowledgeBaseArticleListFrameNextButton)
96 | S:HandleNextPrevButton(KnowledgeBaseArticleListFramePreviousButton)
97 |
98 | S:HandleScrollBar(KnowledgeBaseArticleScrollFrameScrollBar)
99 | S:HandleButton(KnowledgeBaseArticleScrollChildFrameBackButton)
100 |
101 | S:HandleButton(KnowledgeBaseFrameReportIssue)
102 | S:HandleButton(KnowledgeBaseFrameGMTalk)
103 | S:HandleButton(KnowledgeBaseFrameStuck)
104 | S:HandleButton(KnowledgeBaseFrameLag)
105 | S:HandleButton(KnowledgeBaseFrameCancel)
106 | S:HandleButton(KnowledgeBaseFrameAbandonTicket)
107 | S:HandleButton(KnowledgeBaseFrameEditTicket)
108 |
109 | GMChatOpenLog:Point("TOPLEFT", 23, -22)
110 | KnowledgeBaseFrameTopIssuesButton:Point("TOPRIGHT", -62, -118)
111 | KnowledgeBaseFrameTopIssuesButton.Enable = E.noop
112 | KnowledgeBaseFrameTopIssuesButton:Disable()
113 |
114 | KnowledgeBaseFrameEditBox:Height(18)
115 | KnowledgeBaseFrameEditBox:Point("TOPLEFT", KnowledgeBaseFrameDivider, "BOTTOMLEFT", 12, 10)
116 | KnowledgeBaseFrameCategoryDropDown:Point("LEFT", KnowledgeBaseFrameEditBox, "RIGHT", -14, -3)
117 | KnowledgeBaseFrameSubCategoryDropDown:Point("LEFT", KnowledgeBaseFrameCategoryDropDown, "RIGHT", -23, 0)
118 |
119 | KnowledgeBaseFrameSearchButton:Height(20)
120 | KnowledgeBaseFrameSearchButton:Point("LEFT", KnowledgeBaseFrameSubCategoryDropDown, "RIGHT", -2, 3)
121 |
122 | KnowledgeBaseFrameReportIssue:Point("BOTTOMLEFT", 14, 22)
123 | KnowledgeBaseFrameGMTalk:Point("BOTTOM", KnowledgeBaseFrameReportIssue, "TOP", 0, 3)
124 | KnowledgeBaseFrameStuck:Point("LEFT", KnowledgeBaseFrameReportIssue, "RIGHT", 3, 0)
125 | KnowledgeBaseFrameLag:Point("LEFT", KnowledgeBaseFrameGMTalk, "RIGHT", 3, 0)
126 |
127 | KnowledgeBaseFrameAbandonTicket:Point("BOTTOMLEFT", 14, 22)
128 | KnowledgeBaseFrameEditTicket:Point("BOTTOM", KnowledgeBaseFrameAbandonTicket, "TOP", 0, 3)
129 |
130 | KnowledgeBaseFrameCancel:Point("BOTTOMRIGHT", -53, 22)
131 | HelpFrameGMTalkCancel:Point("BOTTOMRIGHT", -53, 22)
132 | -- HelpFrameLagCancel:Point("BOTTOMRIGHT", -53, 22)
133 | HelpFrameReportIssueCancel:Point("BOTTOMRIGHT", -53, 22)
134 | HelpFrameStuckCancel:Point("BOTTOMRIGHT", -53, 22)
135 |
136 | HelpFrameOpenTicketCancel:Height(21)
137 | HelpFrameOpenTicketCancel:Point("BOTTOMRIGHT", -53, 22)
138 | HelpFrameOpenTicketSubmit:Point("RIGHT", HelpFrameOpenTicketCancel, "LEFT", -3, 0)
139 |
140 | HelpFrameViewResponseMoreHelp:Point("BOTTOMLEFT", 14, 22)
141 | HelpFrameViewResponseIssueResolved:Point("LEFT", HelpFrameViewResponseMoreHelp, "RIGHT", 3, 0)
142 | HelpFrameViewResponseCancel:Height(21)
143 | HelpFrameViewResponseCancel:Point("BOTTOMRIGHT", -53, 22)
144 | end
145 |
146 | S:RemoveCallback("Skin_Help")
147 | S:AddCallback("Skin_Help", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_Trainer.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack = unpack
7 | local find = string.find
8 | --WoW API / Variables
9 |
10 | local function LoadSkin()
11 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.trainer ~= true then return end
12 |
13 | ClassTrainerFrame:SetAttribute("UIPanelLayout-width", E:Scale(710))
14 | ClassTrainerFrame:SetAttribute("UIPanelLayout-height", E:Scale(470))
15 | ClassTrainerFrame:Size(710, 470)
16 | ClassTrainerFrame:StripTextures(true)
17 | ClassTrainerFrame:CreateBackdrop("Transparent")
18 | ClassTrainerFrame.backdrop:Point("TOPLEFT", 15, -11)
19 | ClassTrainerFrame.backdrop:Point("BOTTOMRIGHT", -35, 74)
20 |
21 | ClassTrainerListScrollFrame:StripTextures()
22 | ClassTrainerListScrollFrame:Size(300)
23 | ClassTrainerListScrollFrame.SetHeight = E.noop
24 | ClassTrainerListScrollFrame:ClearAllPoints()
25 | ClassTrainerListScrollFrame:Point("TOPLEFT", 17, -85)
26 |
27 | ClassTrainerDetailScrollFrame:StripTextures()
28 | ClassTrainerDetailScrollFrame:Size(295, 280)
29 | ClassTrainerDetailScrollFrame.SetHeight = E.noop
30 | ClassTrainerDetailScrollFrame:ClearAllPoints()
31 | ClassTrainerDetailScrollFrame:Point("TOPRIGHT", ClassTrainerFrame, -64, -85)
32 | ClassTrainerDetailScrollFrame.scrollBarHideable = nil
33 |
34 | ClassTrainerFrame.bg1 = CreateFrame("Frame", nil, ClassTrainerFrame)
35 | ClassTrainerFrame.bg1:SetTemplate("Transparent")
36 | ClassTrainerFrame.bg1:Point("TOPLEFT", 18, -77)
37 | ClassTrainerFrame.bg1:Point("BOTTOMRIGHT", -367, 77)
38 | ClassTrainerFrame.bg1:SetFrameLevel(ClassTrainerFrame.bg1:GetFrameLevel() - 1)
39 |
40 | ClassTrainerFrame.bg2 = CreateFrame("Frame", nil, ClassTrainerFrame)
41 | ClassTrainerFrame.bg2:SetTemplate("Transparent")
42 | ClassTrainerFrame.bg2:Point("TOPLEFT", ClassTrainerFrame.bg1, "TOPRIGHT", 1, 0)
43 | ClassTrainerFrame.bg2:Point("BOTTOMRIGHT", ClassTrainerFrame, "BOTTOMRIGHT", -38, 77)
44 | ClassTrainerFrame.bg2:SetFrameLevel(ClassTrainerFrame.bg2:GetFrameLevel() - 1)
45 |
46 | ClassTrainerDetailScrollChildFrame:StripTextures()
47 | ClassTrainerDetailScrollChildFrame:Size(300, 150)
48 |
49 | ClassTrainerExpandButtonFrame:StripTextures()
50 |
51 | S:HandleDropDownBox(ClassTrainerFrameFilterDropDown)
52 | ClassTrainerFrameFilterDropDown:Point("TOPRIGHT", -55, -40)
53 |
54 | S:HandleScrollBar(ClassTrainerListScrollFrameScrollBar)
55 | S:HandleScrollBar(ClassTrainerDetailScrollFrameScrollBar)
56 |
57 | ClassTrainerCancelButton:ClearAllPoints()
58 | ClassTrainerCancelButton:Point("TOPRIGHT", ClassTrainerDetailScrollFrame, "BOTTOMRIGHT", 23, -3)
59 | S:HandleButton(ClassTrainerCancelButton)
60 |
61 | ClassTrainerTrainButton:ClearAllPoints()
62 | ClassTrainerTrainButton:Point("TOPRIGHT", ClassTrainerCancelButton, "TOPLEFT", -3, 0)
63 | S:HandleButton(ClassTrainerTrainButton)
64 |
65 | ClassTrainerMoneyFrame:ClearAllPoints()
66 | ClassTrainerMoneyFrame:Point("BOTTOMLEFT", ClassTrainerFrame, "BOTTOMRIGHT", -180, 107)
67 |
68 | S:HandleCloseButton(ClassTrainerFrameCloseButton)
69 |
70 | ClassTrainerSkillIcon:StripTextures()
71 | ClassTrainerSkillIcon:StyleButton(nil, true)
72 |
73 | hooksecurefunc("ClassTrainer_SetSelection", function()
74 | local skillIcon = ClassTrainerSkillIcon:GetNormalTexture()
75 | if skillIcon then
76 | skillIcon:SetInside()
77 | skillIcon:SetTexCoord(unpack(E.TexCoords))
78 |
79 | ClassTrainerSkillIcon:SetTemplate("Default")
80 | end
81 | end)
82 |
83 | CLASS_TRAINER_SKILLS_DISPLAYED = 19
84 |
85 | hooksecurefunc("ClassTrainer_SetToTradeSkillTrainer", function()
86 | CLASS_TRAINER_SKILLS_DISPLAYED = 19
87 | end)
88 |
89 | hooksecurefunc("ClassTrainer_SetToClassTrainer", function()
90 | CLASS_TRAINER_SKILLS_DISPLAYED = 19
91 | end)
92 |
93 | for i = 12, 19 do
94 | CreateFrame("Button", "ClassTrainerSkill"..i, ClassTrainerFrame, "ClassTrainerSkillButtonTemplate"):Point("TOPLEFT", _G["ClassTrainerSkill"..i - 1], "BOTTOMLEFT")
95 | end
96 |
97 | ClassTrainerSkill1:Point("TOPLEFT", 22, -80)
98 |
99 | for i = 1, CLASS_TRAINER_SKILLS_DISPLAYED do
100 | local skillButton = _G["ClassTrainerSkill"..i]
101 | local highlight = _G["ClassTrainerSkill"..i.."Highlight"]
102 |
103 | skillButton:SetNormalTexture(E.Media.Textures.Plus)
104 | skillButton.SetNormalTexture = E.noop
105 | skillButton:GetNormalTexture():Size(16)
106 |
107 | highlight:SetTexture("")
108 | highlight.SetTexture = E.noop
109 |
110 | hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
111 | if find(texture, "MinusButton") then
112 | self:GetNormalTexture():SetTexture(E.Media.Textures.Minus)
113 | elseif find(texture, "PlusButton") then
114 | self:GetNormalTexture():SetTexture(E.Media.Textures.Plus)
115 | else
116 | self:GetNormalTexture():SetTexture("")
117 | end
118 | end)
119 | end
120 |
121 | ClassTrainerCollapseAllButton:Point("LEFT", ClassTrainerExpandTabLeft, "RIGHT", 5, 20)
122 |
123 | ClassTrainerCollapseAllButton:SetNormalTexture(E.Media.Textures.Plus)
124 | ClassTrainerCollapseAllButton.SetNormalTexture = E.noop
125 | ClassTrainerCollapseAllButton:GetNormalTexture():Point("LEFT", 3, 2)
126 | ClassTrainerCollapseAllButton:GetNormalTexture():Size(16)
127 |
128 | ClassTrainerCollapseAllButton:SetHighlightTexture("")
129 | ClassTrainerCollapseAllButton.SetHighlightTexture = E.noop
130 |
131 | ClassTrainerCollapseAllButton:SetDisabledTexture(E.Media.Textures.Plus)
132 | ClassTrainerCollapseAllButton.SetDisabledTexture = E.noop
133 | ClassTrainerCollapseAllButton:GetDisabledTexture():Point("LEFT", 3, 2)
134 | ClassTrainerCollapseAllButton:GetDisabledTexture():Size(16)
135 | ClassTrainerCollapseAllButton:GetDisabledTexture():SetDesaturated(true)
136 |
137 | hooksecurefunc(ClassTrainerCollapseAllButton, "SetNormalTexture", function(self, texture)
138 | if find(texture, "MinusButton") then
139 | self:GetNormalTexture():SetTexture(E.Media.Textures.Minus)
140 | else
141 | self:GetNormalTexture():SetTexture(E.Media.Textures.Plus)
142 | end
143 | end)
144 | end
145 |
146 | S:AddCallback("Sirus_Trainer", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Plugins/AddOnSkins/Clique.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI)
2 | local S = E:GetModule("Skins")
3 | local AS = E:GetModule("AddOnSkins", true)
4 | if not AS then return end
5 |
6 | if not AS:IsAddonLODorEnabled("Clique") then return end
7 |
8 | local _G = _G
9 | local unpack = unpack
10 |
11 | local FauxScrollFrame_GetOffset = FauxScrollFrame_GetOffset
12 |
13 | -- Clique r139
14 | -- https://www.curseforge.com/wow/addons/clique/files/466948
15 |
16 | S:RemoveCallbackForAddon("Clique", "Clique")
17 | S:AddCallbackForAddon("Clique", "Clique", function()
18 | if not E.private.addOnSkins.Clique then return end
19 |
20 | CliquePulloutTab:StyleButton(nil, true)
21 | CliquePulloutTab:SetTemplate("Default", true)
22 | CliquePulloutTab:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
23 | CliquePulloutTab:GetNormalTexture():SetInside()
24 | CliquePulloutTab:GetRegions():Hide()
25 |
26 | local function SkinFrame(frame)
27 | frame:StripTextures()
28 | frame:SetTemplate("Transparent")
29 |
30 | frame.titleBar:StripTextures()
31 | frame.titleBar:SetTemplate("Default", true)
32 | frame.titleBar:SetHeight(20)
33 | frame.titleBar:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, 0)
34 | frame.titleBar:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, 0)
35 | end
36 |
37 | hooksecurefunc(Clique, "CreateOptionsFrame", function()
38 | SkinFrame(CliqueFrame)
39 |
40 | CliqueFrame:SetHeight(425)
41 | CliqueFrame:SetPoint("TOPLEFT", SpellBookFrame, "TOPRIGHT", 10, -12)
42 |
43 | local entry
44 |
45 | for i = 1, 10 do
46 | entry = _G["CliqueList"..i]
47 | entry:SetHeight(32)
48 | entry:SetTemplate("Default")
49 | entry.icon:SetPoint("LEFT", 3.5, 0)
50 | entry.icon:SetTexCoord(unpack(E.TexCoords))
51 |
52 | if i > 1 then
53 | entry:SetPoint("TOP", _G["CliqueList" .. (i - 1)], "BOTTOM", 0, -2)
54 | end
55 |
56 | entry:SetScript("OnEnter", function(self)
57 | self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
58 | end)
59 | entry:SetScript("OnLeave", function(self)
60 | local selected = FauxScrollFrame_GetOffset(CliqueListScroll) + self.id
61 | if selected == self.listSelected then
62 | self:SetBackdropBorderColor(1, 1, 1)
63 | else
64 | self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
65 | end
66 | end)
67 | end
68 |
69 | CliqueListScroll:StripTextures()
70 | S:HandleScrollBar(CliqueListScrollScrollBar)
71 |
72 | SkinFrame(CliqueTextListFrame)
73 |
74 | for i = 1, 12 do
75 | entry = _G["CliqueTextList"..i]
76 | S:HandleCheckBox(entry)
77 | entry.backdrop:Point("TOPLEFT", 6, -4)
78 | entry.backdrop:Point("BOTTOMRIGHT", -4, 3)
79 | entry.backdrop:Point("TOPRIGHT", entry.name, "TOPLEFT", -3, 0)
80 | end
81 |
82 | CliqueTextListScroll:StripTextures()
83 | S:HandleScrollBar(CliqueTextListScrollScrollBar)
84 |
85 | S:HandleDropDownBox(CliqueDropDown, 170)
86 | CliqueDropDown:SetPoint("TOPRIGHT", -1, -25)
87 |
88 | S:HandleCloseButton(CliqueButtonClose)
89 | CliqueButtonClose:SetSize(32, 32)
90 | CliqueButtonClose:SetPoint("TOPRIGHT", 5, 5)
91 |
92 | S:HandleButton(CliqueButtonCustom)
93 | S:HandleButton(CliqueButtonFrames)
94 | S:HandleButton(CliqueButtonProfiles)
95 | S:HandleButton(CliqueButtonOptions)
96 | S:HandleButton(CliqueButtonDelete)
97 | S:HandleButton(CliqueButtonEdit)
98 |
99 | S:HandleCloseButton(CliqueTextButtonClose)
100 | CliqueTextButtonClose:SetSize(32, 32)
101 | CliqueTextButtonClose:SetPoint("TOPRIGHT", 5, 5)
102 |
103 | S:HandleButton(CliqueButtonDeleteProfile)
104 | S:HandleButton(CliqueButtonSetProfile)
105 | S:HandleButton(CliqueButtonNewProfile)
106 |
107 | SkinFrame(CliqueOptionsFrame)
108 | CliqueOptionsFrame:SetHeight(125)
109 | CliqueOptionsFrame:SetPoint("TOPLEFT", CliqueFrame, "TOPRIGHT", 0, 0)
110 |
111 | S:HandleCloseButton(CliqueOptionsButtonClose)
112 | CliqueOptionsButtonClose:SetSize(32, 32)
113 | CliqueOptionsButtonClose:SetPoint("TOPRIGHT", 5, 5)
114 |
115 | if CliqueOptionsAnyDown then
116 | S:HandleCheckBox(CliqueOptionsAnyDown)
117 | CliqueOptionsAnyDown.backdrop:Point("TOPLEFT", 6, -4)
118 | CliqueOptionsAnyDown.backdrop:Point("BOTTOMRIGHT", -4, 3)
119 | CliqueOptionsAnyDown.backdrop:Point("TOPRIGHT", CliqueOptionsAnyDown.name, "TOPLEFT", -3, 0)
120 | end
121 |
122 | S:HandleCheckBox(CliqueOptionsSpecSwitch)
123 | CliqueOptionsSpecSwitch.backdrop:Point("TOPLEFT", 6, -4)
124 | CliqueOptionsSpecSwitch.backdrop:Point("BOTTOMRIGHT", -4, 3)
125 | CliqueOptionsSpecSwitch.backdrop:Point("TOPRIGHT", CliqueOptionsSpecSwitch.name, "TOPLEFT", -3, 0)
126 |
127 | for i = 1, 10 do
128 | local dropdown = _G["CliqueSpecDropDown"..i]
129 | if dropdown then
130 | S:HandleDropDownBox(dropdown)
131 | dropdown:SetWidth(225)
132 | _G["CliqueSpecDropDown"..i.."Button"]:SetSize(20, 20)
133 | end
134 | end
135 |
136 | SkinFrame(CliqueCustomFrame)
137 |
138 | S:HandleButton(CliqueCustomButtonBinding)
139 | S:HandleButton(CliqueCustomButtonIcon)
140 | CliqueCustomButtonIcon.icon:SetTexCoord(unpack(E.TexCoords))
141 | CliqueCustomButtonIcon.icon:SetInside()
142 |
143 | for i = 1, 5 do
144 | entry = _G["CliqueCustomArg"..i]
145 | S:HandleEditBox(entry)
146 | entry.backdrop:Point("TOPLEFT", -5, -5)
147 | entry.backdrop:Point("BOTTOMRIGHT", -5, 5)
148 | end
149 |
150 | CliqueMulti:SetBackdrop(nil)
151 | CliqueMulti:CreateBackdrop("Default")
152 | CliqueMulti.backdrop:Point("TOPLEFT", 5, -8)
153 | CliqueMulti.backdrop:Point("BOTTOMRIGHT", -5, 8)
154 | S:HandleScrollBar(CliqueMultiScrollFrameScrollBar)
155 |
156 | S:HandleButton(CliqueCustomButtonCancel)
157 | S:HandleButton(CliqueCustomButtonSave)
158 |
159 | SkinFrame(CliqueIconSelectFrame)
160 |
161 | local button, buttonIcon
162 | for i = 1, 20 do
163 | button = _G["CliqueIcon"..i]
164 | buttonIcon = _G["CliqueIcon"..i.."Icon"]
165 |
166 | button:StripTextures()
167 | button:StyleButton(nil, true)
168 | button.hover:SetAllPoints()
169 | button:CreateBackdrop("Default")
170 |
171 | buttonIcon:SetAllPoints()
172 | buttonIcon:SetTexCoord(unpack(E.TexCoords))
173 | end
174 |
175 | CliqueIconScrollFrame:StripTextures()
176 | S:HandleScrollBar(CliqueIconScrollFrameScrollBar)
177 | end)
178 |
179 | hooksecurefunc(Clique, "ListScrollUpdate", function(self)
180 | if not CliqueListScroll then return end
181 |
182 | local offset = FauxScrollFrame_GetOffset(CliqueListScroll)
183 | local clickCasts = self.sortList
184 | local idx, button
185 |
186 | for i = 1, 10 do
187 | idx = offset + i
188 | button = _G["CliqueList" .. i]
189 |
190 | if idx <= #clickCasts then
191 | if idx == self.listSelected then
192 | button:SetBackdropBorderColor(1, 1, 1)
193 | else
194 | button:SetBackdropBorderColor(unpack(E["media"].bordercolor))
195 | end
196 | end
197 | end
198 | end)
199 | end)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Merchant.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local unpack, select = unpack, select
7 | --WoW API / Variables
8 | local hooksecurefunc = hooksecurefunc
9 |
10 | local function LoadSkin()
11 | if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.merchant ~= true then return end
12 |
13 | local MerchantFrame = _G.MerchantFrame
14 | S:HandlePortraitFrame(MerchantFrame)
15 | MerchantFrameInset:StripTextures()
16 | MerchantArtFrame:StripTextures()
17 | MerchantMoneyBg:StripTextures()
18 | MerchantMoneyInset:StripTextures()
19 |
20 | MerchantFrame:EnableMouseWheel(true)
21 | MerchantFrame:SetScript("OnMouseWheel", function(_, value)
22 | if value > 0 then
23 | if MerchantPrevPageButton:IsShown() and MerchantPrevPageButton:IsEnabled() == 1 then
24 | MerchantPrevPageButton_OnClick()
25 | end
26 | else
27 | if MerchantNextPageButton:IsShown() and MerchantNextPageButton:IsEnabled() == 1 then
28 | MerchantNextPageButton_OnClick()
29 | end
30 | end
31 | end)
32 |
33 | for i = 1, 12 do
34 | local item = _G["MerchantItem"..i]
35 | local button = _G["MerchantItem"..i.."ItemButton"]
36 | local icon = _G["MerchantItem"..i.."ItemButtonIconTexture"]
37 | local money = _G["MerchantItem"..i.."MoneyFrame"]
38 | local nameFrame = _G["MerchantItem"..i.."NameFrame"]
39 | local name = _G["MerchantItem"..i.."Name"]
40 | local slot = _G["MerchantItem"..i.."SlotTexture"]
41 |
42 | item:StripTextures(true)
43 | item:CreateBackdrop("Default")
44 | item.backdrop:Point("BOTTOMRIGHT", 0, -4)
45 |
46 | button:StripTextures()
47 | button:StyleButton()
48 | button:SetTemplate("Default", true)
49 | button:Size(40)
50 | button:Point("TOPLEFT", item, "TOPLEFT", 4, -4)
51 |
52 | icon:SetTexCoord(unpack(E.TexCoords))
53 | icon:SetInside()
54 |
55 | nameFrame:Point("LEFT", slot, "RIGHT", -6, -17)
56 |
57 | name:Point("LEFT", slot, "RIGHT", -4, 5)
58 |
59 | money:ClearAllPoints()
60 | money:Point("BOTTOMLEFT", button, "BOTTOMRIGHT", 3, 0)
61 |
62 | for j = 1, 2 do
63 | local currencyItem = _G["MerchantItem"..i.."AltCurrencyFrameItem"..j]
64 | local currencyIcon = _G["MerchantItem"..i.."AltCurrencyFrameItem"..j.."Texture"]
65 |
66 | currencyIcon.backdrop = CreateFrame("Frame", nil, currencyItem)
67 | currencyIcon.backdrop:SetTemplate("Default")
68 | currencyIcon.backdrop:SetFrameLevel(currencyItem:GetFrameLevel())
69 | currencyIcon.backdrop:SetOutside(currencyIcon)
70 |
71 | currencyIcon:SetTexCoord(unpack(E.TexCoords))
72 | currencyIcon:SetParent(currencyIcon.backdrop)
73 | end
74 | end
75 |
76 | S:HandleNextPrevButton(MerchantNextPageButton, nil, nil, true)
77 | S:HandleNextPrevButton(MerchantPrevPageButton, nil, nil, true)
78 |
79 | MerchantRepairItemButton:StyleButton()
80 | MerchantRepairItemButton:SetTemplate()
81 |
82 | for i = 1, MerchantRepairItemButton:GetNumRegions() do
83 | local region = select(i, MerchantRepairItemButton:GetRegions())
84 | if region:GetObjectType() == "Texture" and region:GetTexture() == "Interface\\MerchantFrame\\UI-Merchant-RepairIcons" then
85 | region:SetTexCoord(0.04, 0.24, 0.07, 0.5)
86 | region:SetInside()
87 | end
88 | end
89 |
90 | MerchantRepairAllButton:StyleButton()
91 | MerchantRepairAllButton:SetTemplate()
92 |
93 | MerchantRepairAllIcon:SetTexCoord(0.34, 0.1, 0.34, 0.535, 0.535, 0.1, 0.535, 0.535)
94 | MerchantRepairAllIcon:SetInside()
95 |
96 | MerchantGuildBankRepairButton:StyleButton()
97 | MerchantGuildBankRepairButton:SetTemplate()
98 |
99 | MerchantGuildBankRepairButtonIcon:SetTexCoord(0.61, 0.82, 0.1, 0.52)
100 | MerchantGuildBankRepairButtonIcon:SetInside()
101 |
102 | MerchantBuyBackItem:StripTextures(true)
103 | MerchantBuyBackItem:CreateBackdrop("Transparent")
104 | MerchantBuyBackItem.backdrop:Point("TOPLEFT", -6, 6)
105 | MerchantBuyBackItem.backdrop:Point("BOTTOMRIGHT", 6, -6)
106 | MerchantBuyBackItem:Point("TOPLEFT", MerchantItem10, "BOTTOMLEFT", 0, -48)
107 |
108 | MerchantBuyBackItemItemButton:StripTextures()
109 | MerchantBuyBackItemItemButton:SetTemplate("Default", true)
110 | MerchantBuyBackItemItemButton:StyleButton()
111 |
112 | MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(unpack(E.TexCoords))
113 | MerchantBuyBackItemItemButtonIconTexture:SetInside()
114 |
115 | for i = 1, 2 do
116 | S:HandleTab(_G["MerchantFrameTab"..i])
117 | end
118 |
119 | hooksecurefunc("MerchantFrame_UpdateMerchantInfo", function()
120 | local numMerchantItems = GetMerchantNumItems()
121 | local index
122 | local itemButton, itemName
123 | for i = 1, BUYBACK_ITEMS_PER_PAGE do
124 | index = (((MerchantFrame.page - 1) * MERCHANT_ITEMS_PER_PAGE) + i)
125 | itemButton = _G["MerchantItem"..i.."ItemButton"]
126 | itemName = _G["MerchantItem"..i.."Name"]
127 |
128 | if index <= numMerchantItems then
129 | if itemButton.link then
130 | local _, _, quality = GetItemInfo(itemButton.link)
131 | local r, g, b = GetItemQualityColor(quality)
132 |
133 | itemName:SetTextColor(r, g, b)
134 | if quality then
135 | itemButton:SetBackdropBorderColor(r, g, b)
136 | else
137 | itemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
138 | end
139 | end
140 | end
141 |
142 | local buybackName = GetBuybackItemInfo(GetNumBuybackItems())
143 | if buybackName then
144 | local _, _, quality = GetItemInfo(buybackName)
145 | local r, g, b = GetItemQualityColor(quality)
146 |
147 | MerchantBuyBackItemName:SetTextColor(r, g, b)
148 | if quality then
149 | MerchantBuyBackItemItemButton:SetBackdropBorderColor(r, g, b)
150 | else
151 | MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
152 | end
153 | else
154 | MerchantBuyBackItemItemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
155 | end
156 | end
157 | end)
158 |
159 | hooksecurefunc("MerchantFrame_UpdateBuybackInfo", function()
160 | local numBuybackItems = GetNumBuybackItems()
161 | local itemButton, itemName
162 | for i = 1, BUYBACK_ITEMS_PER_PAGE do
163 | itemButton = _G["MerchantItem"..i.."ItemButton"]
164 | itemName = _G["MerchantItem"..i.."Name"]
165 |
166 | if i <= numBuybackItems then
167 | local buybackName = GetBuybackItemInfo(i)
168 | if buybackName then
169 | local _, _, quality = GetItemInfo(buybackName)
170 | local r, g, b = GetItemQualityColor(quality)
171 |
172 | itemName:SetTextColor(r, g, b)
173 | if quality then
174 | itemButton:SetBackdropBorderColor(r, g, b)
175 | else
176 | itemButton:SetBackdropBorderColor(unpack(E.media.bordercolor))
177 | end
178 | end
179 | end
180 | end
181 | end)
182 | end
183 |
184 | S:RemoveCallback("Skin_Merchant")
185 | S:AddCallback("Skin_Merchant", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Blizzard/Sirus_TradeSkill.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local select = select
7 | local unpack = unpack
8 | local find = string.find
9 | --WoW API / Variables
10 | local GetItemInfo = GetItemInfo
11 | local GetItemQualityColor = GetItemQualityColor
12 | local GetTradeSkillItemLink = GetTradeSkillItemLink
13 | local GetTradeSkillNumReagents = GetTradeSkillNumReagents
14 | local GetTradeSkillReagentInfo = GetTradeSkillReagentInfo
15 | local GetTradeSkillReagentItemLink = GetTradeSkillReagentItemLink
16 |
17 | local function LoadSkin()
18 | if not E.private.skins.blizzard.enable or not E.private.skins.blizzard.tradeskill then return end
19 |
20 | S:HandlePortraitFrame(TradeSkillFrame)
21 | S:HandleMaxMinFrame(TradeSkillFrame.MaxMinButtonFrame)
22 |
23 | TradeSkillFrame.RecipeInset:StripTextures()
24 | TradeSkillFrame.DetailsInset:StripTextures()
25 |
26 | TradeSkillListScrollFrame:StripTextures()
27 | S:HandleScrollBar(TradeSkillListScrollFrameScrollBar)
28 |
29 | for i = 1, 25 do
30 | local skillButton = _G["TradeSkillSkill"..i]
31 | local skillButtonHighlight = _G["TradeSkillSkill"..i.."Highlight"]
32 |
33 | skillButton:SetNormalTexture(E.Media.Textures.Plus)
34 | skillButton.SetNormalTexture = E.noop
35 | skillButton:GetNormalTexture():Size(13)
36 | skillButton:GetNormalTexture():Point("LEFT", 2, 1)
37 |
38 | skillButtonHighlight:SetTexture("")
39 | skillButtonHighlight.SetTexture = E.noop
40 |
41 | hooksecurefunc(skillButton, "SetNormalTexture", function(self, texture)
42 | if find(texture, "MinusButton") then
43 | self:GetNormalTexture():SetTexture(E.Media.Textures.Minus)
44 | elseif find(texture, "PlusButton") then
45 | self:GetNormalTexture():SetTexture(E.Media.Textures.Plus)
46 | else
47 | self:GetNormalTexture():SetTexture("")
48 | end
49 | end)
50 | end
51 |
52 | TradeSkillFrame.LearnedTab:StripTextures()
53 | TradeSkillFrame.UnlearnedTab:StripTextures()
54 |
55 | TradeSkillDetailScrollFrame:StripTextures()
56 | S:HandleScrollBar(TradeSkillDetailScrollFrameScrollBar)
57 | TradeSkillDetailScrollFrameScrollBar:SetFrameLevel(TradeSkillListScrollFrameScrollBar:GetFrameLevel())
58 |
59 | S:HandleButton(TradeSkillCreateAllButton, true)
60 | S:HandleButton(TradeSkillCancelButton, true)
61 | S:HandleButton(TradeSkillCreateButton, true)
62 |
63 | TradeSkillInputBox:Height(16)
64 | S:HandleEditBox(TradeSkillInputBox)
65 | TradeSkillInputBox.Left:SetAlpha(0)
66 | TradeSkillInputBox.Right:SetAlpha(0)
67 | TradeSkillInputBox.Middle:SetAlpha(0)
68 | TradeSkillInputBox:SetPoint("LEFT", TradeSkillCreateAllButton, "RIGHT", 27, 0)
69 | S:HandleNextPrevButton(TradeSkillInputBox.IncrementButton)
70 | TradeSkillInputBox.IncrementButton:SetPoint("LEFT", TradeSkillInputBox, "RIGHT", 6 , 0)
71 | S:HandleNextPrevButton(TradeSkillInputBox.DecrementButton)
72 |
73 | TradeSkillSkillIcon:StripTextures()
74 | TradeSkillSkillIcon:StyleButton(nil, true)
75 | TradeSkillSkillIcon:SetTemplate("Default")
76 |
77 | for i = 1, 8 do
78 | local reagent = _G["TradeSkillReagent"..i]
79 | local icon = _G["TradeSkillReagent"..i.."IconTexture"]
80 | local count = _G["TradeSkillReagent"..i.."Count"]
81 | local name = _G["TradeSkillReagent"..i.."Name"]
82 | local nameFrame = _G["TradeSkillReagent"..i.."NameFrame"]
83 |
84 | reagent:SetTemplate("Default")
85 | reagent:StyleButton(nil, true)
86 | reagent:Size(143, 40)
87 |
88 | icon.backdrop = CreateFrame("Frame", nil, reagent)
89 | icon.backdrop:SetTemplate()
90 | icon.backdrop:Point("TOPLEFT", icon, -1, 1)
91 | icon.backdrop:Point("BOTTOMRIGHT", icon, 1, -1)
92 |
93 | icon:SetTexCoord(unpack(E.TexCoords))
94 | icon:SetDrawLayer("OVERLAY")
95 | icon:Size(E.PixelMode and 38 or 32)
96 | icon:Point("TOPLEFT", E.PixelMode and 1 or 4, -(E.PixelMode and 1 or 4))
97 | icon:SetParent(icon.backdrop)
98 |
99 | count:SetParent(icon.backdrop)
100 | count:SetDrawLayer("OVERLAY")
101 |
102 | name:Point("LEFT", nameFrame, "LEFT", 20, 0)
103 |
104 | nameFrame:Kill()
105 | end
106 |
107 | TradeSkillRankFrame:StripTextures()
108 | TradeSkillRankFrame:CreateBackdrop()
109 | TradeSkillRankFrame:SetStatusBarTexture(E.media.normTex)
110 | E:RegisterStatusBar(TradeSkillRankFrame)
111 |
112 | TradeSkillFrame.FilterButton:StripTextures(true)
113 | S:HandleButton(TradeSkillFrame.FilterButton)
114 |
115 | S:HandleEditBox(TradeSkillFrame.SearchBox)
116 |
117 | TradeSkillFrame.LinkToButton:GetNormalTexture():SetTexCoord(6 / 32, 24 / 32, 12 / 32, 24 / 32)
118 | TradeSkillFrame.LinkToButton:GetPushedTexture():SetTexCoord(6 / 32, 24 / 32, 14 / 32, 26 / 32)
119 | TradeSkillFrame.LinkToButton:GetHighlightTexture():Kill()
120 | TradeSkillFrame.LinkToButton:CreateBackdrop()
121 | TradeSkillFrame.LinkToButton:SetSize(19, 14)
122 | TradeSkillFrame.LinkToButton:SetPoint("BOTTOMRIGHT", TradeSkillFrame.FilterButton, "TOPRIGHT", -2, 8)
123 |
124 | hooksecurefunc("TradeSkillFrame_SetSelection", function(id)
125 | if TradeSkillSkillIcon:GetNormalTexture() then
126 | TradeSkillSkillIcon:SetAlpha(1)
127 | TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
128 | TradeSkillSkillIcon:GetNormalTexture():SetInside()
129 | else
130 | TradeSkillSkillIcon:SetAlpha(0)
131 | end
132 |
133 | local skillLink = GetTradeSkillItemLink(id)
134 | local r, g, b
135 |
136 | if skillLink then
137 | local quality = select(3, GetItemInfo(skillLink))
138 | if quality then
139 | r, g, b = GetItemQualityColor(quality)
140 |
141 | TradeSkillSkillIcon:SetBackdropBorderColor(r, g, b)
142 | TradeSkillSkillName:SetTextColor(r, g, b)
143 | else
144 | TradeSkillSkillIcon:SetBackdropBorderColor(unpack(E.media.bordercolor))
145 | TradeSkillSkillName:SetTextColor(1, 1, 1)
146 | end
147 | end
148 |
149 | for i = 1, GetTradeSkillNumReagents(id) do
150 | local _, _, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(id, i)
151 | local reagentLink = GetTradeSkillReagentItemLink(id, i)
152 |
153 | if reagentLink then
154 | local reagent = _G["TradeSkillReagent"..i]
155 | local icon = _G["TradeSkillReagent"..i.."IconTexture"]
156 | local quality = select(3, GetItemInfo(reagentLink))
157 |
158 | if quality then
159 | local name = _G["TradeSkillReagent"..i.."Name"]
160 | r, g, b = GetItemQualityColor(quality)
161 |
162 | icon.backdrop:SetBackdropBorderColor(r, g, b)
163 | reagent:SetBackdropBorderColor(r, g, b)
164 |
165 | if playerReagentCount < reagentCount then
166 | name:SetTextColor(0.5, 0.5, 0.5)
167 | else
168 | name:SetTextColor(r, g, b)
169 | end
170 | else
171 | reagent:SetBackdropBorderColor(unpack(E.media.bordercolor))
172 | icon.backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
173 | end
174 | end
175 | end
176 | end)
177 | end
178 |
179 | S:AddCallback("Sirus_TradeSkill", LoadSkin)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Init.lua:
--------------------------------------------------------------------------------
1 | local AddOnName = ...
2 | local E, L, V, P, G = unpack(ElvUI)
3 | local EP = E.Libs.EP
4 |
5 | local addon = E:NewModule("ElvUI_Sirus", "AceEvent-3.0")
6 |
7 | local wipe = table.wipe
8 | local tinsert = table.insert
9 |
10 | local GetNumBattlefieldStats = GetNumBattlefieldStats
11 |
12 | C_BattlefieldScoreManager.scoreData = {}
13 |
14 | function C_BattlefieldScoreManager:GenerateScoreData()
15 | wipe(self.scoreData)
16 |
17 | local factionID = C_FactionManager:GetFactionOverride()
18 |
19 | for i = 1, self._GetNumBattlefieldScores() do
20 | local name, killingBlows, honorableKills, deaths, honorGained, faction, rank, race, class, classToken, damageDone, healingDone = self._GetBattlefieldScore(i)
21 | local additionalStatData = {}
22 |
23 | if self:IsValidation() then
24 | for statID = 1, GetNumBattlefieldStats() do
25 | tinsert(additionalStatData, GetBattlefieldStatData(i, statID))
26 | end
27 |
28 | if factionID then
29 | if name then
30 | local GUID = UnitGUID(name)
31 |
32 | if GUID then
33 | faction = factionID
34 | else
35 | faction = factionID == PLAYER_FACTION_GROUP.Alliance and PLAYER_FACTION_GROUP.Horde or PLAYER_FACTION_GROUP.Alliance
36 | end
37 | else
38 | faction = factionID == PLAYER_FACTION_GROUP.Alliance and PLAYER_FACTION_GROUP.Horde or PLAYER_FACTION_GROUP.Alliance
39 | end
40 | end
41 | end
42 |
43 | if not self.selectedFaction or self.selectedFaction == faction then
44 | tinsert(self.scoreData, {name, killingBlows, honorableKills, deaths, honorGained, faction, rank, race, class, classToken, damageDone, healingDone, additionalStatData})
45 | end
46 | end
47 | end
48 |
49 | do
50 | local oldPlayerTalentFrame_Refresh = PlayerTalentFrame_Refresh
51 | function PlayerTalentFrame_Refresh()
52 | if not PlayerTalentFrame:IsShown() then return end
53 |
54 | return oldPlayerTalentFrame_Refresh()
55 | end
56 | end
57 |
58 | do -- temp fix extra ab
59 | local LAB = E.Libs.LAB
60 | local function Update(self)
61 | local name = self:GetName()
62 |
63 | if self:HasAction() then
64 | local actionType, id, _, spellID = GetActionInfo(self._state_action)
65 | if spellID then
66 | SPELL_ACTION_DATA[name] = spellID
67 | elseif actionType == "item" and id then
68 | ITEM_ACTION_DATA[name] = id
69 | end
70 | else
71 | SPELL_ACTION_DATA[name] = false
72 | ITEM_ACTION_DATA[name] = false
73 | end
74 | end
75 |
76 | local old_script = ExtraActionBarFrame.FindOnActionBar
77 | function ExtraActionBarFrame:FindOnActionBar(...)
78 | for button in next, LAB.buttonRegistry do
79 | if button._state_type == "action" then
80 | Update(button)
81 | end
82 | end
83 |
84 | return old_script(ExtraActionBarFrame, ...)
85 | end
86 | end
87 |
88 | local oldIsAddOnLoaded = IsAddOnLoaded
89 | function IsAddOnLoaded(name)
90 | if name == "Blizzard_TimeManager" then
91 | return true
92 | else
93 | return oldIsAddOnLoaded(name)
94 | end
95 | end
96 |
97 | PVPUIFrame:HookScript("OnHide", function(self)
98 | if self.TitleTimer then
99 | self.TitleTimer:Cancel()
100 | self.TitleTimer = nil
101 | end
102 | end)
103 |
104 | PVPHonorFrame:HookScript("OnHide", function(self)
105 | local worldPVP2Button = self.BottomInset.WorldPVPContainer.WorldPVP2Button
106 |
107 | if worldPVP2Button.Timer then
108 | worldPVP2Button.Timer:Cancel()
109 | worldPVP2Button.Timer = nil
110 | end
111 | end)
112 |
113 | local function GameMenuFrame_UpdateVisibleButtons()
114 | if not GameMenuFrame.isSirus then
115 | GameMenuFrame.isSirus = true
116 | else
117 | GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + GameMenuButtonLogout:GetHeight() + 1)
118 | end
119 |
120 | local addonsButton = GameMenuButtonAddOns or ElvUI_AddonListButton
121 | if addonsButton then
122 | GameMenuButtonMacros:ClearAllPoints()
123 | GameMenuButtonMacros:Point("TOP", GameMenuButtonKeybindings, "BOTTOM", 0, -1)
124 |
125 | addonsButton:ClearAllPoints()
126 | addonsButton:Point("TOP", GameMenuButtonMacros, "BOTTOM", 0, -1)
127 |
128 | GameMenuFrame.ElvUI:ClearAllPoints()
129 | GameMenuFrame.ElvUI:Point("TOP", addonsButton, "BOTTOM", 0, -1)
130 |
131 | GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + GameMenuButtonLogout:GetHeight() + 1)
132 | end
133 | end
134 |
135 | function addon:GetUnitCategory(unit)
136 | local category
137 | if ElvSirusDB[E.myrealm][unit] then
138 | category = self.Categories[self.CategoriesIDs[ElvSirusDB[E.myrealm][unit]]]
139 | return category.name, category.icon, category.name2
140 | -- else
141 |
142 | end
143 | end
144 |
145 | function addon:UPDATE_MOUSEOVER_UNIT()
146 | if UnitIsPlayer("mouseover") then
147 | local name = UnitName("mouseover")
148 | if not name or name == UNKNOWN then return end
149 |
150 | for i = 1, 40 do
151 | local _, _, _, _, _, _, _, _, _, _, spellID = UnitAura("mouseover", i, "HARMFUL")
152 | if not spellID then break end
153 |
154 | if self.Categories[spellID] then
155 | local id = self.Categories[spellID].id
156 | if ElvSirusDB[E.myrealm][name] ~= id then
157 | ElvSirusDB[E.myrealm][name] = id
158 | end
159 | break
160 | end
161 | end
162 | end
163 | end
164 |
165 | function addon:FixArenaTaint()
166 | ArenaEnemyFrames.ClearAllPoints = E.noop
167 | ArenaEnemyFrames.SetPoint = E.noop
168 | end
169 |
170 | function addon:ADDON_LOADED(_, addonName)
171 | if addonName == "Blizzard_ArenaUI" then
172 | self:FixArenaTaint()
173 | end
174 | end
175 |
176 | function addon:Initialize()
177 | ElvSirusDB = ElvSirusDB or {}
178 | ElvSirusDB[E.myrealm] = ElvSirusDB[E.myrealm] or {}
179 |
180 | self:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
181 |
182 | if E.private.unitframe.disabledBlizzardFrames.arena then
183 | if not IsAddOnLoaded("Blizzard_ArenaUI") then
184 | self:RegisterEvent("ADDON_LOADED")
185 | else
186 | self:FixArenaTaint()
187 | end
188 | end
189 |
190 | hooksecurefunc("WorldStateScoreFrame_Update", function()
191 | local offset = FauxScrollFrame_GetOffset(WorldStateScoreScrollFrame)
192 | local _, name, nameText
193 |
194 | for i = 1, MAX_WORLDSTATE_SCORE_BUTTONS do
195 | name, _, _, _, _, faction, _, _, _, classToken = GetBattlefieldScore(offset + i)
196 |
197 | if name then
198 | local _, _, name2 = addon:GetUnitCategory(name)
199 | if name2 then
200 | nameText = _G["WorldStateScoreButton"..i.."NameText"]
201 | nameText:SetFormattedText("%s |cffffffff%s|r", name, name2)
202 | end
203 | end
204 | end
205 | end)
206 |
207 | GameMenuFrame:HookScript("OnShow", GameMenuFrame_UpdateVisibleButtons)
208 |
209 | local function StaticPopup_OnShow(self)
210 | if self.ReplayInfoFrame then
211 | self.ReplayInfoFrame:Hide()
212 | end
213 | end
214 |
215 | for index = 1, 4 do
216 | E.StaticPopupFrames[index]:HookScript("OnShow", StaticPopup_OnShow)
217 | end
218 |
219 | EP:RegisterPlugin(AddOnName, self.GetOptions)
220 | end
221 |
222 | local function InitializeCallback()
223 | addon:Initialize()
224 | end
225 |
226 | E:RegisterModule(addon:GetName(), InitializeCallback)
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Skins/Skins.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local S = E:GetModule("Skins")
3 |
4 | --Lua functions
5 | local _G = _G
6 | local ipairs = ipairs
7 | local tremove = table.remove
8 | local find = string.find
9 | --WoW API / Variables
10 |
11 | function S:HandleEditBox(frame)
12 | if frame.backdrop then return end
13 |
14 | frame:CreateBackdrop()
15 | frame.backdrop:SetFrameLevel(frame:GetFrameLevel())
16 |
17 | if frame.Left then frame.Left:SetAlpha(0) end
18 | if frame.Middle then frame.Middle:SetAlpha(0) end
19 | if frame.Right then frame.Right:SetAlpha(0) end
20 |
21 | if frame.IncrementButton and frame.DecrementButton then
22 | S:HandleNextPrevButton(frame.IncrementButton, nil, nil, true)
23 | frame.IncrementButton:Size(24)
24 | S:HandleNextPrevButton(frame.DecrementButton, nil, nil, true)
25 | frame.DecrementButton:Size(24)
26 | frame.DecrementButton:Point("RIGHT", frame, "LEFT", 0, 0)
27 | end
28 |
29 | local EditBoxName = frame.GetName and frame:GetName()
30 | if EditBoxName then
31 | if _G[EditBoxName.."Left"] then _G[EditBoxName.."Left"]:SetAlpha(0) end
32 | if _G[EditBoxName.."Middle"] then _G[EditBoxName.."Middle"]:SetAlpha(0) end
33 | if _G[EditBoxName.."Right"] then _G[EditBoxName.."Right"]:SetAlpha(0) end
34 | if _G[EditBoxName.."Mid"] then _G[EditBoxName.."Mid"]:SetAlpha(0) end
35 |
36 | if find(EditBoxName, "Silver") or find(EditBoxName, "Copper") then
37 | frame.backdrop:Point("BOTTOMRIGHT", -12, -2)
38 | end
39 | end
40 | end
41 |
42 | function S:HandleInsetFrame(frame)
43 | assert(frame, "doesn't exist!")
44 |
45 | if frame.InsetBorderTop then frame.InsetBorderTop:Hide() end
46 | if frame.InsetBorderTopLeft then frame.InsetBorderTopLeft:Hide() end
47 | if frame.InsetBorderTopRight then frame.InsetBorderTopRight:Hide() end
48 |
49 | if frame.InsetBorderBottom then frame.InsetBorderBottom:Hide() end
50 | if frame.InsetBorderBottomLeft then frame.InsetBorderBottomLeft:Hide() end
51 | if frame.InsetBorderBottomRight then frame.InsetBorderBottomRight:Hide() end
52 |
53 | if frame.InsetBorderLeft then frame.InsetBorderLeft:Hide() end
54 | if frame.InsetBorderRight then frame.InsetBorderRight:Hide() end
55 |
56 | if frame.Bgs then frame.Bgs:Hide() end
57 | end
58 |
59 | -- All frames that have a Portrait
60 | function S:HandlePortraitFrame(frame, setBackdrop)
61 | assert(frame, "doesn't exist!")
62 |
63 | local name = frame and frame.GetName and frame:GetName()
64 | local insetFrame = name and _G[name.."Inset"] or frame.Inset
65 | local portraitFrame = name and _G[name.."Portrait"] or frame.Portrait or frame.portrait
66 | local portraitFrameOverlay = name and _G[name.."PortraitOverlay"] or frame.PortraitOverlay
67 | local artFrameOverlay = name and _G[name.."ArtOverlayFrame"] or frame.ArtOverlayFrame
68 | local nineSliceFrame = name and _G[name.."NineSlice"] or frame.NineSlice
69 |
70 | frame:StripTextures()
71 |
72 | if portraitFrame then portraitFrame:SetAlpha(0) end
73 | if portraitFrameOverlay then portraitFrameOverlay:SetAlpha(0) end
74 | if artFrameOverlay then artFrameOverlay:SetAlpha(0) end
75 | if nineSliceFrame then nineSliceFrame:StripTextures() end
76 |
77 | if insetFrame then
78 | S:HandleInsetFrame(insetFrame)
79 | end
80 |
81 | if frame.CloseButton then
82 | S:HandleCloseButton(frame.CloseButton)
83 | end
84 |
85 | if setBackdrop then
86 | frame:CreateBackdrop("Transparent")
87 | frame.backdrop:SetAllPoints()
88 | else
89 | frame:SetTemplate("Transparent")
90 | end
91 | end
92 |
93 | function S:HandleMaxMinFrame(frame)
94 | if frame.isSkinned then return end
95 | assert(frame, "does not exist.")
96 |
97 | frame:StripTextures(true)
98 |
99 | for name, direction in pairs ({["MaximizeButton"] = "up", ["MinimizeButton"] = "down"}) do
100 | local button = frame[name]
101 |
102 | if button then
103 | button:Size(26, 26)
104 | button:ClearAllPoints()
105 | button:Point("CENTER")
106 | button:GetHighlightTexture():Kill()
107 |
108 | button:SetScript("OnEnter", function(self)
109 | self:GetNormalTexture():SetVertexColor(unpack(E.media.rgbvaluecolor))
110 | self:GetPushedTexture():SetVertexColor(unpack(E.media.rgbvaluecolor))
111 | end)
112 |
113 | button:SetScript("OnLeave", function(self)
114 | self:GetNormalTexture():SetVertexColor(1, 1, 1)
115 | self:GetPushedTexture():SetVertexColor(1, 1, 1)
116 | end)
117 |
118 | button:SetNormalTexture(E.Media.Textures.ArrowUp)
119 | button:GetNormalTexture():SetRotation(S.ArrowRotation[direction])
120 |
121 | button:SetPushedTexture(E.Media.Textures.ArrowUp)
122 | button:GetPushedTexture():SetRotation(S.ArrowRotation[direction])
123 | end
124 | end
125 |
126 | frame.isSkinned = true
127 | end
128 |
129 | function S:HandleRotateButton(btn)
130 | if btn.isSkinned then return end
131 |
132 | btn:SetTemplate()
133 |
134 | btn:Size(btn:GetWidth() - 14, btn:GetHeight() - 14)
135 |
136 | local normTex = btn:GetNormalTexture()
137 | local pushTex = btn:GetPushedTexture()
138 | local highlightTex = btn:GetHighlightTexture()
139 |
140 | normTex:SetInside()
141 | pushTex:SetAllPoints(normTex)
142 |
143 | local name = btn:GetName()
144 | if name then
145 | normTex:SetTexture("Interface\\Common\\UI-ModelControlPanel")
146 | pushTex:SetTexture("Interface\\Common\\UI-ModelControlPanel")
147 |
148 | if string.find(name, "Right") then
149 | normTex:SetTexCoord(0.57812500, 0.82812500, 0.28906250, 0.41406250)
150 | pushTex:SetTexCoord(0.57812500, 0.82812500, 0.28906250, 0.41406250)
151 | else
152 | normTex:SetTexCoord(0.01562500, 0.26562500, 0.28906250, 0.41406250)
153 | pushTex:SetTexCoord(0.01562500, 0.26562500, 0.28906250, 0.41406250)
154 | end
155 | else
156 | normTex:SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65)
157 | pushTex:SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65)
158 | end
159 |
160 | highlightTex:SetAllPoints(normTex)
161 | highlightTex:SetTexture(1, 1, 1, 0.3)
162 |
163 | btn.isSkinned = true
164 | end
165 |
166 | function S:HandleControlButton(button)
167 | button:Size(18)
168 |
169 | S:HandleButton(button)
170 |
171 | button.bg:SetAlpha(0)
172 | button.icon:SetInside()
173 | select(3, button:GetRegions()):Hide()
174 | end
175 |
176 | function S:HandleControlFrame(frame)
177 | local name = frame:GetName()
178 | frame:StripTextures()
179 | frame:Width(58)
180 |
181 | local rightButton = _G[name.."RotateRightButton"]
182 | local resetButton = _G[name.."RotateResetButton"]
183 |
184 | S:HandleControlButton(_G[name.."RotateLeftButton"])
185 | S:HandleControlButton(rightButton)
186 | S:HandleControlButton(resetButton)
187 |
188 | rightButton:Point("LEFT", "$parentRotateLeftButton", "RIGHT", 2, 0)
189 | resetButton:Point("LEFT", "$parentRotateRightButton", "RIGHT", 2, 0)
190 | end
191 |
192 | function S:RemoveCallback(eventName)
193 | if not eventName or type(eventName) ~= "string" then
194 | E:Print("Invalid argument #1 to S:RemoveCallback (string expected)")
195 | return
196 | elseif not self.nonAddonCallbacks[eventName] then
197 | E:Print("Invalid 'eventName' #1 to S:RemoveCallback ", eventName)
198 | return
199 | end
200 |
201 | self.nonAddonCallbacks[eventName] = nil
202 | for index, event in ipairs(self.nonAddonCallbacks.CallPriority) do
203 | if event == eventName then
204 | tremove(self.nonAddonCallbacks.CallPriority, index)
205 | end
206 | end
207 | E.UnregisterCallback(S, eventName)
208 | end
209 |
210 | function S:RemoveCallbackForAddon(addonName, eventName)
211 | if not addonName or type(addonName) ~= "string" then
212 | E:Print("Invalid argument #1 to S:RemoveCallbackForAddon (string expected)")
213 | return
214 | elseif not self.addonCallbacks[addonName] then
215 | E:Print("Invalid 'addonName' #1 to S:RemoveCallbackForAddon ", addonName)
216 | return
217 | end
218 |
219 | for index, event in ipairs(self.addonCallbacks[addonName].CallPriority) do
220 | if event == eventName then
221 | tremove(self.addonCallbacks[addonName].CallPriority, index)
222 | end
223 | end
224 | if #self.addonCallbacks[addonName].CallPriority == 0 then
225 | self.addonCallbacks[addonName] = nil
226 | end
227 | E.UnregisterCallback(S, eventName)
228 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/Maps/Minimap.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local M = E:GetModule("Minimap")
3 | local Reminder = E:GetModule("ReminderBuffs")
4 |
5 | --Lua functions
6 | --WoW API / Variables
7 |
8 | local menuList = {
9 | {
10 | text = CHARACTER_BUTTON,
11 | notCheckable = 1,
12 | func = function()
13 | ToggleCharacter("PaperDollFrame")
14 | end
15 | },
16 | {
17 | text = SPELLBOOK_ABILITIES_BUTTON,
18 | notCheckable = 1,
19 | func = function()
20 | ToggleFrame(SpellBookFrame)
21 | end
22 | },
23 | {
24 | text = TALENTS_BUTTON,
25 | notCheckable = 1,
26 | func = ToggleTalentFrame
27 | },
28 | {
29 | text = ACHIEVEMENT_BUTTON,
30 | notCheckable = 1,
31 | func = ToggleAchievementFrame
32 | },
33 | {
34 | text = QUESTLOG_BUTTON,
35 | notCheckable = 1,
36 | func = function()
37 | ToggleFrame(QuestLogFrame)
38 | end
39 | },
40 | {
41 | text = SOCIAL_BUTTON,
42 | notCheckable = 1,
43 | func = function()
44 | ToggleFriendsFrame(1)
45 | end
46 | },
47 | {
48 | text = L["Calendar"],
49 | notCheckable = 1,
50 | func = function()
51 | GameTimeFrame:Click()
52 | end
53 | },
54 | {
55 | text = L["Farm Mode"],
56 | notCheckable = 1,
57 | func = FarmMode
58 | },
59 | {
60 | text = BATTLEFIELD_MINIMAP,
61 | notCheckable = 1,
62 | func = ToggleBattlefieldMinimap
63 | },
64 | {
65 | text = TIMEMANAGER_TITLE,
66 | notCheckable = 1,
67 | func = ToggleTimeManager
68 | },
69 | {
70 | text = PLAYER_V_PLAYER,
71 | notCheckable = 1,
72 | func = TogglePVPUIFrame
73 | },
74 | {
75 | text = LFG_TITLE,
76 | notCheckable = 1,
77 | func = function()
78 | ToggleFrame(LFDParentFrame)
79 | end
80 | },
81 | {
82 | text = LOOKING_FOR_RAID,
83 | notCheckable = 1,
84 | func = function()
85 | ToggleFrame(LFRParentFrame)
86 | end
87 | },
88 | {
89 | text = MAINMENU_BUTTON,
90 | notCheckable = 1,
91 | func = function()
92 | if GameMenuFrame:IsShown() then
93 | PlaySound("igMainMenuQuit")
94 | HideUIPanel(GameMenuFrame)
95 | else
96 | PlaySound("igMainMenuOpen")
97 | ShowUIPanel(GameMenuFrame)
98 | end
99 | end
100 | },
101 | {
102 | text = HELP_BUTTON,
103 | notCheckable = 1,
104 | func = ToggleHelpFrame
105 | }
106 | }
107 |
108 | function M:Minimap_OnMouseUp(btn)
109 | local position = self:GetPoint()
110 | if btn == "MiddleButton" or (btn == "RightButton" and IsShiftKeyDown()) then
111 | if position:match("LEFT") then
112 | EasyMenu(menuList, MinimapRightClickMenu, "cursor", 0, 0, "MENU", 2)
113 | else
114 | EasyMenu(menuList, MinimapRightClickMenu, "cursor", -160, 0, "MENU", 2)
115 | end
116 | elseif btn == "RightButton" then
117 | ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, "cursor")
118 | else
119 | Minimap_OnClick(self)
120 | end
121 | end
122 |
123 | Minimap:SetScript("OnMouseUp", M.Minimap_OnMouseUp)
124 | if FarmModeMap then
125 | FarmModeMap:SetScript("OnMouseUp", M.Minimap_OnMouseUp)
126 | end
127 |
128 | function M:UpdateSettings()
129 | if InCombatLockdown() then
130 | self:RegisterEvent("PLAYER_REGEN_ENABLED")
131 | end
132 |
133 | E.MinimapSize = E.private.general.minimap.enable and E.db.general.minimap.size or Minimap:GetWidth() + 10
134 | E.MinimapWidth, E.MinimapHeight = E.MinimapSize, E.MinimapSize
135 |
136 | if E.db.general.reminder.enable then
137 | E.RBRWidth = (E.MinimapHeight + ((E.Border - E.Spacing*3) * 5) + E.Border*2) / 6
138 | else
139 | E.RBRWidth = 0
140 | end
141 |
142 | if E.private.general.minimap.enable then
143 | Minimap:Size(E.MinimapSize, E.MinimapSize)
144 | end
145 |
146 | if LeftMiniPanel and RightMiniPanel then
147 | if E.db.datatexts.minimapPanels and E.private.general.minimap.enable then
148 | LeftMiniPanel:Show()
149 | RightMiniPanel:Show()
150 | else
151 | LeftMiniPanel:Hide()
152 | RightMiniPanel:Hide()
153 | end
154 | end
155 |
156 | if BottomMiniPanel then
157 | if E.db.datatexts.minimapBottom and E.private.general.minimap.enable then
158 | BottomMiniPanel:Show()
159 | else
160 | BottomMiniPanel:Hide()
161 | end
162 | end
163 |
164 | if BottomLeftMiniPanel then
165 | if E.db.datatexts.minimapBottomLeft and E.private.general.minimap.enable then
166 | BottomLeftMiniPanel:Show()
167 | else
168 | BottomLeftMiniPanel:Hide()
169 | end
170 | end
171 |
172 | if BottomRightMiniPanel then
173 | if E.db.datatexts.minimapBottomRight and E.private.general.minimap.enable then
174 | BottomRightMiniPanel:Show()
175 | else
176 | BottomRightMiniPanel:Hide()
177 | end
178 | end
179 |
180 | if TopMiniPanel then
181 | if E.db.datatexts.minimapTop and E.private.general.minimap.enable then
182 | TopMiniPanel:Show()
183 | else
184 | TopMiniPanel:Hide()
185 | end
186 | end
187 |
188 | if TopLeftMiniPanel then
189 | if E.db.datatexts.minimapTopLeft and E.private.general.minimap.enable then
190 | TopLeftMiniPanel:Show()
191 | else
192 | TopLeftMiniPanel:Hide()
193 | end
194 | end
195 |
196 | if TopRightMiniPanel then
197 | if E.db.datatexts.minimapTopRight and E.private.general.minimap.enable then
198 | TopRightMiniPanel:Show()
199 | else
200 | TopRightMiniPanel:Hide()
201 | end
202 | end
203 |
204 | if MMHolder then
205 | MMHolder:Width((Minimap:GetWidth() + E.Border*2 + E.Spacing*3) + E.RBRWidth)
206 |
207 | if E.db.datatexts.minimapPanels then
208 | MMHolder:Height(Minimap:GetHeight() + (LeftMiniPanel and (LeftMiniPanel:GetHeight() + E.Border) or 24) + E.Spacing*3)
209 | else
210 | MMHolder:Height(Minimap:GetHeight() + E.Border + E.Spacing*3)
211 | end
212 | end
213 |
214 | if Minimap.location then
215 | Minimap.location:Width(E.MinimapSize)
216 |
217 | if E.db.general.minimap.locationText ~= "SHOW" or not E.private.general.minimap.enable then
218 | Minimap.location:Hide()
219 | else
220 | Minimap.location:Show()
221 | end
222 | end
223 |
224 | if MinimapMover then
225 | MinimapMover:Size(MMHolder:GetSize())
226 | end
227 |
228 | if GameTimeFrame then
229 | if E.private.general.minimap.hideCalendar then
230 | GameTimeFrame:Hide()
231 | else
232 | local pos = E.db.general.minimap.icons.calendar.position or "TOPRIGHT"
233 | local scale = E.db.general.minimap.icons.calendar.scale or 1
234 | GameTimeFrame:ClearAllPoints()
235 | GameTimeFrame:Point(pos, Minimap, pos, E.db.general.minimap.icons.calendar.xOffset or 0, E.db.general.minimap.icons.calendar.yOffset or 0)
236 | GameTimeFrame:SetScale(scale)
237 | GameTimeFrame:Show()
238 | end
239 | end
240 |
241 | if MiniMapMailFrame then
242 | local pos = E.db.general.minimap.icons.mail.position or "TOPRIGHT"
243 | local scale = E.db.general.minimap.icons.mail.scale or 1
244 | MiniMapMailFrame:ClearAllPoints()
245 | MiniMapMailFrame:Point(pos, Minimap, pos, E.db.general.minimap.icons.mail.xOffset or 3, E.db.general.minimap.icons.mail.yOffset or 4)
246 | MiniMapMailFrame:SetScale(scale)
247 | end
248 |
249 | if MiniMapLFGFrame then
250 | local pos = E.db.general.minimap.icons.lfgEye.position or "BOTTOMRIGHT"
251 | local scale = E.db.general.minimap.icons.lfgEye.scale or 1
252 | MiniMapLFGFrame:ClearAllPoints()
253 | MiniMapLFGFrame:Point(pos, Minimap, pos, E.db.general.minimap.icons.lfgEye.xOffset or 3, E.db.general.minimap.icons.lfgEye.yOffset or 0)
254 | MiniMapLFGFrame:SetScale(scale)
255 | LFDSearchStatus:SetScale(scale)
256 | end
257 |
258 | if QueueStatusMinimapButton then
259 | local pos = E.db.general.minimap.icons.battlefield.position or "BOTTOMRIGHT"
260 | local scale = E.db.general.minimap.icons.battlefield.scale or 1
261 | QueueStatusMinimapButton:ClearAllPoints()
262 | QueueStatusMinimapButton:Point(pos, Minimap, pos, E.db.general.minimap.icons.battlefield.xOffset or 3, E.db.general.minimap.icons.battlefield.yOffset or 0)
263 | QueueStatusMinimapButton:SetScale(scale)
264 | QueueStatusFrame:SetScale(scale)
265 | end
266 |
267 | if MiniMapBattlefieldFrame then
268 | local pos = E.db.general.minimap.icons.battlefield.position or "BOTTOMRIGHT"
269 | local scale = E.db.general.minimap.icons.battlefield.scale or 1
270 | MiniMapBattlefieldFrame:ClearAllPoints()
271 | MiniMapBattlefieldFrame:Point(pos, Minimap, pos, E.db.general.minimap.icons.battlefield.xOffset or 3, E.db.general.minimap.icons.battlefield.yOffset or 0)
272 | MiniMapBattlefieldFrame:SetScale(scale)
273 | end
274 |
275 | if MiniMapInstanceDifficulty then
276 | local pos = E.db.general.minimap.icons.difficulty.position or "TOPLEFT"
277 | local scale = E.db.general.minimap.icons.difficulty.scale or 1
278 | local x = E.db.general.minimap.icons.difficulty.xOffset or 0
279 | local y = E.db.general.minimap.icons.difficulty.yOffset or 0
280 | MiniMapInstanceDifficulty:ClearAllPoints()
281 | MiniMapInstanceDifficulty:Point(pos, Minimap, pos, x, y)
282 | MiniMapInstanceDifficulty:SetScale(scale)
283 | end
284 |
285 | if ElvConfigToggle then
286 | if E.db.general.reminder.enable and E.db.datatexts.minimapPanels and E.private.general.minimap.enable then
287 | ElvConfigToggle:Show()
288 | ElvConfigToggle:Width(E.RBRWidth)
289 | else
290 | ElvConfigToggle:Hide()
291 | end
292 | end
293 |
294 | if ElvUI_ReminderBuffs then
295 | Reminder:UpdateSettings()
296 | end
297 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Modules/DataTexts/Friends.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
2 | local mod = E:GetModule("Sirus_DataTexts")
3 | local DT = E:GetModule("DataTexts")
4 |
5 | --Lua functions
6 | local sort, wipe, next, type = table.sort, wipe, next, type
7 | local format, find, join, gsub = string.format, string.find, string.join, string.gsub
8 | --WoW API / Variables
9 | local SendChatMessage = SendChatMessage
10 | local InviteUnit = InviteUnit
11 | local SetItemRef = SetItemRef
12 | local GetFriendInfo = GetFriendInfo
13 | local GetNumFriends = GetNumFriends
14 | local GetQuestDifficultyColor = GetQuestDifficultyColor
15 | local GetRealZoneText = GetRealZoneText
16 | local UnitInParty = UnitInParty
17 | local UnitInRaid = UnitInRaid
18 | local UnitIsAFK = UnitIsAFK
19 | local UnitIsDND = UnitIsDND
20 | local ToggleFriendsFrame = ToggleFriendsFrame
21 | local EasyMenu = EasyMenu
22 | local AFK, DND, FRIENDS = AFK, DND, FRIENDS
23 | local RAID_CLASS_COLORS = RAID_CLASS_COLORS
24 |
25 | local menuList = {
26 | {text = OPTIONS_MENU, isTitle = true, notCheckable = true},
27 | {text = INVITE, hasArrow = true, notCheckable = true},
28 | {text = CHAT_MSG_WHISPER_INFORM, hasArrow = true, notCheckable= true},
29 | {text = PLAYER_STATUS, hasArrow = true, notCheckable = true,
30 | menuList = {
31 | {text = "|cff2BC226"..AVAILABLE.."|r", notCheckable = true, func = function() if UnitIsAFK("player") then SendChatMessage("", "AFK") elseif UnitIsDND("player") then SendChatMessage("", "DND") end end},
32 | {text = "|cffE7E716"..DND.."|r", notCheckable = true, func = function() if not UnitIsDND("player") then SendChatMessage("", "DND") end end},
33 | {text = "|cffFF0000"..AFK.."|r", notCheckable = true, func = function() if not UnitIsAFK("player") then SendChatMessage("", "AFK") end end}
34 | }
35 | }
36 | }
37 |
38 | local function inviteClick(_, name)
39 | FriendDatatextRightClickMenu:Hide()
40 |
41 | if type(name) ~= "number" then
42 | InviteUnit(name)
43 | end
44 | end
45 |
46 | local function whisperClick(_, name)
47 | FriendDatatextRightClickMenu:Hide()
48 |
49 | SetItemRef("player:"..name, format("|Hplayer:%1$s|h[%1$s]|h",name), "LeftButton")
50 | end
51 |
52 | local levelNameString = "|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r"
53 | local levelNameClassString = "|cff%02x%02x%02x%d|r %s%s%s"
54 | local levelNameClassStringCategory = "|T%s:16:16:0:0:64:64:4:60:4:60|t |cff%02x%02x%02x%d|r %s%s%s"
55 | local totalOnlineString = join("", FRIENDS_LIST_ONLINE, ": %s/%s")
56 | local tthead = {r = 0.4, g = 0.78, b = 1}
57 | local activezone, inactivezone = {r = 0.3, g = 1.0, b = 0.3}, {r = 0.65, g = 0.65, b = 0.65}
58 | local displayString = ""
59 | local statusTable = {" |cffFFFFFF[|r|cffFF9900"..L["AFK"].."|r|cffFFFFFF]|r", " |cffFFFFFF[|r|cffFF3333"..L["DND"].."|r|cffFFFFFF]|r", ""}
60 | local groupedTable = {"|cffaaaaaa*|r", ""}
61 | local friendTable = {}
62 | local friendOnline, friendOffline = gsub(ERR_FRIEND_ONLINE_SS, "\124Hplayer:%%s\124h%[%%s%]\124h", ""), gsub(ERR_FRIEND_OFFLINE_S, "%%s", "")
63 | local dataValid = false
64 | local lastPanel
65 |
66 | local function SortAlphabeticName(a, b)
67 | if a[1] and b[1] then
68 | return a[1] < b[1]
69 | end
70 | end
71 |
72 | local function BuildFriendTable(total)
73 | wipe(friendTable)
74 | for i = 1, total do
75 | local categoryIcon, _
76 | local name, level, class, area, connected, status, note = GetFriendInfo(i)
77 |
78 | if connected then
79 | local categoryID = GetGuildCharacterCategory(name)
80 | if categoryID then
81 | _, _, categoryIcon = GetSpellInfo(categoryID)
82 | end
83 |
84 | local className = E:UnlocalizedClassName(class) or ""
85 | local state = statusTable[(status == "<"..AFK..">" and 1) or (status == "<"..DND..">" and 2) or 3]
86 | friendTable[i] = {name, level, className, area, connected, state, note, categoryIcon}
87 | end
88 | end
89 |
90 | if next(friendTable) then
91 | sort(friendTable, SortAlphabeticName)
92 | end
93 | end
94 |
95 | local function OnEvent(self, event, ...)
96 | local _, onlineFriends = GetNumFriends()
97 |
98 | -- special handler to detect friend coming online or going offline
99 | -- when this is the case, we invalidate our buffered table and update the
100 | -- datatext information
101 | if event == "CHAT_MSG_SYSTEM" then
102 | local message = select(1, ...)
103 | if not (find(message, friendOnline) or find(message, friendOffline)) then return end
104 | end
105 |
106 | -- force update when showing tooltip
107 | dataValid = false
108 |
109 | self.text:SetFormattedText(displayString, FRIENDS, onlineFriends)
110 |
111 | lastPanel = self
112 | end
113 |
114 | local function OnClick(_, btn)
115 | DT.tooltip:Hide()
116 |
117 | if btn == "RightButton" then
118 | local menuCountWhispers = 0
119 | local menuCountInvites = 0
120 | local classc, levelc, info, shouldSkip
121 |
122 | menuList[2].menuList = {}
123 | menuList[3].menuList = {}
124 |
125 | if #friendTable > 0 then
126 | for i = 1, #friendTable do
127 | info = friendTable[i]
128 | if info[5] then
129 | shouldSkip = false
130 | if (info[6] == statusTable[1]) and E.db.datatexts.friends.hideAFK then
131 | shouldSkip = true
132 | elseif (info[6] == statusTable[2]) and E.db.datatexts.friends.hideDND then
133 | shouldSkip = true
134 | end
135 | if not shouldSkip then
136 | classc, levelc = (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[info[3]]) or RAID_CLASS_COLORS[info[3]], GetQuestDifficultyColor(info[2])
137 | classc = classc or GetQuestDifficultyColor(info[2])
138 |
139 | menuCountWhispers = menuCountWhispers + 1
140 | menuList[3].menuList[menuCountWhispers] = {text = format(levelNameString, levelc.r*255, levelc.g*255, levelc.b*255, info[2], classc.r*255, classc.g*255, classc.b*255, info[1]), arg1 = info[1], notCheckable=true, func = whisperClick}
141 | if not (UnitInParty(info[1]) or UnitInRaid(info[1])) then
142 | menuCountInvites = menuCountInvites + 1
143 | menuList[2].menuList[menuCountInvites] = {text = format(levelNameString, levelc.r*255, levelc.g*255, levelc.b*255, info[2], classc.r*255, classc.g*255, classc.b*255, info[1]), arg1 = info[1], notCheckable=true, func = inviteClick}
144 | end
145 | end
146 | end
147 | end
148 | end
149 |
150 | EasyMenu(menuList, FriendDatatextRightClickMenu, "cursor", 0, 0, "MENU", 2)
151 | else
152 | ToggleFriendsFrame(1)
153 | end
154 | end
155 |
156 | local function OnEnter(self)
157 | DT:SetupTooltip(self)
158 |
159 | local numberOfFriends, onlineFriends = GetNumFriends()
160 |
161 | -- no friends online, quick exit
162 | if onlineFriends == 0 then return end
163 |
164 | if not dataValid then
165 | -- only retrieve information for all on-line members when we actually view the tooltip
166 | if numberOfFriends > 0 then BuildFriendTable(numberOfFriends) end
167 | dataValid = true
168 | end
169 |
170 | local zonec, classc, levelc, info, grouped, shouldSkip
171 | DT.tooltip:AddDoubleLine(L["Friends List"], format(totalOnlineString, onlineFriends, numberOfFriends), tthead.r, tthead.g, tthead.b, tthead.r, tthead.g, tthead.b)
172 | if onlineFriends > 0 then
173 | for i = 1, #friendTable do
174 | info = friendTable[i]
175 | if info[5] then
176 | shouldSkip = false
177 | if (info[6] == statusTable[1]) and E.db.datatexts.friends.hideAFK then
178 | shouldSkip = true
179 | elseif (info[6] == statusTable[2]) and E.db.datatexts.friends.hideDND then
180 | shouldSkip = true
181 | end
182 | if not shouldSkip then
183 | if GetRealZoneText() == info[4] then zonec = activezone else zonec = inactivezone end
184 | classc, levelc = (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[info[3]]) or RAID_CLASS_COLORS[info[3]], GetQuestDifficultyColor(info[2])
185 |
186 | classc = classc or GetQuestDifficultyColor(info[2])
187 |
188 | if UnitInParty(info[1]) or UnitInRaid(info[1]) then grouped = 1 else grouped = 2 end
189 |
190 | if info[8] then
191 | DT.tooltip:AddDoubleLine(format(levelNameClassStringCategory, info[8], levelc.r*255, levelc.g*255, levelc.b*255, info[2], info[1], groupedTable[grouped], " "..info[6]), info[4], classc.r, classc.g, classc.b, zonec.r, zonec.g, zonec.b)
192 | else
193 | DT.tooltip:AddDoubleLine(format(levelNameClassString, levelc.r*255, levelc.g*255, levelc.b*255, info[2], info[1], groupedTable[grouped], " "..info[6]), info[4], classc.r, classc.g, classc.b, zonec.r, zonec.g, zonec.b)
194 | end
195 | end
196 | end
197 | end
198 | end
199 |
200 | DT.tooltip:Show()
201 | end
202 |
203 | local function ValueColorUpdate(hex)
204 | displayString = join("", "%s: ", hex, "%d|r")
205 |
206 | if lastPanel ~= nil then
207 | OnEvent(lastPanel, "ELVUI_COLOR_UPDATE")
208 | end
209 | end
210 | E.valueColorUpdateFuncs[ValueColorUpdate] = true
211 |
212 | function mod:HookFriens()
213 | lastPanel = self:GetPanelByDataTextName("Friends")
214 | if lastPanel then
215 | lastPanel:SetScript("OnEvent", OnEvent)
216 | lastPanel:SetScript("OnClick", OnClick)
217 | lastPanel:SetScript("OnEnter", OnEnter)
218 | OnEvent(lastPanel, "ELVUI_FORCE_RUN")
219 | end
220 |
221 | DT.RegisteredDataTexts.Friends.eventFunc = OnEvent
222 | DT.RegisteredDataTexts.Friends.onClick = OnClick
223 | DT.RegisteredDataTexts.Friends.onEnter = OnEnter
224 | end
225 |
--------------------------------------------------------------------------------
/ElvUI_Sirus/OptionsUI.lua:
--------------------------------------------------------------------------------
1 | local E, L, V, P, G = unpack(ElvUI)
2 | local S = E:GetModule("ElvUI_Sirus")
3 | local DT = E:GetModule("DataTexts")
4 | local DB = E:GetModule("DataBars")
5 |
6 | function S:GetOptions()
7 | --ActionBars
8 | E.Options.args.actionbar.args.microbar.args.buttonsPerRow.max = #SHARED_MICROMENU_BUTTONS
9 |
10 | -- Auras
11 | E.Options.args.auras.args.buffs.args.filter = {
12 | order = 15,
13 | type = "select",
14 | sortByValue = true,
15 | name = L["Add Regular Filter"],
16 | desc = L["These filters use a list of spells to determine if an aura should be allowed or blocked. The content of these filters can be modified in the 'Filters' section of the config."],
17 | values = function()
18 | local filters = {}
19 | filters[""] = NONE
20 | local list = E.global.unitframe.aurafilters
21 | if list then
22 | for filter in pairs(list) do
23 | filters[filter] = filter
24 | end
25 | end
26 |
27 | return filters
28 | end
29 | }
30 | E.Options.args.auras.args.debuffs.args.filter = {
31 | order = 15,
32 | type = "select",
33 | sortByValue = true,
34 | name = L["Add Regular Filter"],
35 | desc = L["These filters use a list of spells to determine if an aura should be allowed or blocked. The content of these filters can be modified in the 'Filters' section of the config."],
36 | values = function()
37 | local filters = {}
38 | filters[""] = NONE
39 | local list = E.global.unitframe.aurafilters
40 | if list then
41 | for filter in pairs(list) do
42 | filters[filter] = filter
43 | end
44 | end
45 |
46 | return filters
47 | end
48 | }
49 |
50 | -- General
51 | E.Options.args.general.args.blizzUIImprovements.args.case = {
52 | order = 9,
53 | type = "toggle",
54 | name = E.NewSign.."Улучшенная рулетка",
55 | get = function(info) return E.db.sirus[info[#info]] end,
56 | set = function(info, value)
57 | E.db.sirus[info[#info]] = value
58 | E:StaticPopup_Show("PRIVATE_RL")
59 | end
60 | }
61 |
62 | --Skins
63 | E.Options.args.skins.args.blizzard.args.deathRecap = {
64 | type = "toggle",
65 | name = DEATH_RECAP_TITLE_DONT_INFO,
66 | desc = L["TOGGLESKIN_DESC"]
67 | }
68 | E.Options.args.skins.args.blizzard.args.guild = {
69 | type = "toggle",
70 | name = L["Guild"],
71 | desc = L["TOGGLESKIN_DESC"]
72 | }
73 | E.Options.args.skins.args.blizzard.args.losscontrol = {
74 | type = "toggle",
75 | name = LOSS_OF_CONTROL,
76 | desc = L["TOGGLESKIN_DESC"]
77 | }
78 | E.Options.args.skins.args.blizzard.args.store = {
79 | type = "toggle",
80 | name = "Магазин",
81 | desc = L["TOGGLESKIN_DESC"]
82 | }
83 | E.Options.args.skins.args.blizzard.args.timer = {
84 | type = "toggle",
85 | name = "Таймер",
86 | desc = L["TOGGLESKIN_DESC"]
87 | }
88 | E.Options.args.skins.args.blizzard.args.transmogrify = {
89 | type = "toggle",
90 | name = "Трансмогрификация",
91 | desc = L["TOGGLESKIN_DESC"]
92 | }
93 | E.Options.args.skins.args.blizzard.args.collections = {
94 | type = "toggle",
95 | name = "Коллекции",
96 | desc = L["TOGGLESKIN_DESC"]
97 | }
98 | E.Options.args.skins.args.blizzard.args.encounterjournal = {
99 | type = "toggle",
100 | name = "Путеводитель",
101 | desc = L["TOGGLESKIN_DESC"]
102 | }
103 | E.Options.args.skins.args.blizzard.args.roulette = {
104 | type = "toggle",
105 | name = ROULETTE_TITLE,
106 | desc = L["TOGGLESKIN_DESC"]
107 | }
108 | E.Options.args.skins.args.blizzard.args.mountChest = {
109 | type = "toggle",
110 | name = MOUNT_CHEST_LABEL,
111 | desc = L["TOGGLESKIN_DESC"]
112 | }
113 | E.Options.args.skins.args.blizzard.args.headhunting = {
114 | type = "toggle",
115 | name = HEADHUNTING,
116 | desc = L["TOGGLESKIN_DESC"]
117 | }
118 |
119 | E.Options.args.skins.args.blizzard.args.extraButton = {
120 | type = "toggle",
121 | name = "Кнопки действий",
122 | desc = L["TOGGLESKIN_DESC"]
123 | }
124 | E.Options.args.skins.args.cleanExtraButton = {
125 | order = 9,
126 | type = "toggle",
127 | name = E.NewSign.."Упрощенные кнопки действий",
128 | get = function(info) return E.private.skins.cleanExtraButton end,
129 | set = function(info, value)
130 | E.private.skins.cleanExtraButton = value
131 | E:StaticPopup_Show("PRIVATE_RL")
132 | end
133 | }
134 |
135 | E.Options.args.databars.args.honor = {
136 | order = 5,
137 | type = "group",
138 | name = PVP_TAB_SERVICES,
139 | get = function(info) return DB.db.honor[info[#info]] end,
140 | set = function(info, value)
141 | DB.db.honor[info[#info]] = value
142 | DB:UpdateHonorDimensions()
143 | end,
144 | args = {
145 | header = {
146 | order = 1,
147 | type = "header",
148 | name = PVP_TAB_SERVICES
149 | },
150 | enable = {
151 | order = 2,
152 | type = "toggle",
153 | name = L["Enable"],
154 | set = function(info, value)
155 | DB.db.honor[info[#info]] = value
156 | DB:EnableDisable_HonorBar()
157 | end
158 | },
159 | mouseover = {
160 | order = 3,
161 | type = "toggle",
162 | name = L["Mouseover"]
163 | },
164 | hideOutsidePvP = {
165 | order = 4,
166 | type = "toggle",
167 | name = L["Hide Outside PvP"],
168 | set = function(info, value)
169 | DB.db.honor[info[#info]] = value
170 | DB:UpdateHonor()
171 | end
172 | },
173 | hideInVehicle = {
174 | order = 5,
175 | type = "toggle",
176 | name = L["Hide In Vehicle"],
177 | set = function(info, value)
178 | DB.db.honor[info[#info]] = value
179 | DB:UpdateHonor()
180 | end
181 | },
182 | hideInCombat = {
183 | order = 6,
184 | type = "toggle",
185 | name = L["Hide In Combat"],
186 | set = function(info, value)
187 | DB.db.honor[info[#info]] = value
188 | DB:UpdateHonor()
189 | end
190 | },
191 | spacer = {
192 | order = 7,
193 | type = "description",
194 | name = " "
195 | },
196 | orientation = {
197 | order = 8,
198 | type = "select",
199 | name = L["Statusbar Fill Orientation"],
200 | desc = L["Direction the bar moves on gains/losses"],
201 | values = {
202 | ["HORIZONTAL"] = L["Horizontal"],
203 | ["VERTICAL"] = L["Vertical"]
204 | }
205 | },
206 | width = {
207 | order = 9,
208 | type = "range",
209 | name = L["Width"],
210 | min = 5, max = ceil(GetScreenWidth() or 800), step = 1
211 | },
212 | height = {
213 | order = 10,
214 | type = "range",
215 | name = L["Height"],
216 | min = 5, max = ceil(GetScreenHeight() or 800), step = 1
217 | },
218 | font = {
219 | order = 11,
220 | type = "select", dialogControl = "LSM30_Font",
221 | name = L["Font"],
222 | values = AceGUIWidgetLSMlists.font
223 | },
224 | textSize = {
225 | order = 12,
226 | type = "range",
227 | name = L["FONT_SIZE"],
228 | min = 6, max = 22, step = 1
229 | },
230 | fontOutline = {
231 | order = 13,
232 | type = "select",
233 | name = L["Font Outline"],
234 | values = {
235 | ["NONE"] = L["NONE"],
236 | ["OUTLINE"] = "OUTLINE",
237 | ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE",
238 | ["THICKOUTLINE"] = "THICKOUTLINE"
239 | }
240 | },
241 | textFormat = {
242 | order = 14,
243 | type = "select",
244 | name = L["Text Format"],
245 | width = "double",
246 | values = {
247 | NONE = L["NONE"],
248 | CUR = L["Current"],
249 | REM = L["Remaining"],
250 | PERCENT = L["Percent"],
251 | CURMAX = L["Current - Max"],
252 | CURPERC = L["Current - Percent"],
253 | CURREM = L["Current - Remaining"],
254 | CURPERCREM = L["Current - Percent (Remaining)"],
255 | },
256 | set = function(info, value)
257 | DB.db.honor[info[#info]] = value
258 | DB:UpdateHonor()
259 | end
260 | }
261 | }
262 | }
263 |
264 | E.Options.args.datatexts.args.ArenaRating = {
265 | order = 7,
266 | type = "group",
267 | name = PVP_YOUR_RATING,
268 | get = function(info) return E.db.datatexts.ArenaRating[tonumber(info[#info])] end,
269 | set = function(info, value)
270 | E.db.datatexts.ArenaRating[tonumber(info[#info])] = value
271 | DT:LoadDataTexts()
272 | end,
273 | args = {
274 | ["1"] = {
275 | order = 1,
276 | type = "toggle",
277 | name = "Solo",
278 | },
279 | ["2"] = {
280 | order = 2,
281 | type = "toggle",
282 | name = "2x2",
283 | },
284 | ["3"] = {
285 | order = 3,
286 | type = "toggle",
287 | name = "3x3",
288 | },
289 | ["4"] = {
290 | order = 4,
291 | type = "toggle",
292 | name = "RGB",
293 | }
294 | }
295 | }
296 | end
297 |
298 | local EE = E:GetModule("ElvUI_Enhanced", true)
299 | if EE then
300 | hooksecurefunc(EE, "GetOptions", function()
301 | local enhanced = E.Options.args.enhanced
302 | if enhanced then
303 | enhanced.args.blizzardGroup.args.deathRecap = nil
304 | enhanced.args.blizzardGroup.args.characterFrame.args.modelFrames = nil
305 | enhanced.args.blizzardGroup.args.characterFrame.args.paperdollBackgrounds = nil
306 | enhanced.args.blizzardGroup.args.dressingRoom = nil
307 | enhanced.args.blizzardGroup.args.timerTracker = nil
308 | end
309 | end)
310 |
311 | E:GetModule("Enhanced_TimerTracker").Initialize = E.noop
312 | E:GetModule("Enhanced_ModelFrames").Initialize = E.noop
313 | local EB = E:GetModule("Enhanced_Blizzard")
314 | EB.DressUpFrame = E.noop
315 | EB.DeathRecap = E.noop
316 | end
--------------------------------------------------------------------------------
/ElvUI_Sirus/Libraries/LibDualSpec-1.0/LibDualSpec-1.0.lua:
--------------------------------------------------------------------------------
1 | local MAJOR, MINOR = "LibDualSpec-1.0", 6
2 | assert(LibStub, MAJOR.." requires LibStub")
3 | local lib, minor = LibStub:NewLibrary(MAJOR, MINOR)
4 | if not lib then return end
5 |
6 | lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
7 |
8 | lib.registry = lib.registry or {}
9 | lib.options = lib.options or {}
10 | lib.mixin = lib.mixin or {}
11 | lib.upgrades = lib.upgrades or {}
12 | lib.currentSpec = lib.currentSpec or 0
13 |
14 | if minor and minor < 5 then
15 | lib.talentsLoaded, lib.talentGroup = nil, nil
16 | lib.specLoaded, lib.specGroup = nil, nil
17 | lib.eventFrame:UnregisterAllEvents()
18 | wipe(lib.options)
19 | end
20 |
21 | local registry = lib.registry
22 | local options = lib.options
23 | local mixin = lib.mixin
24 | local upgrades = lib.upgrades
25 |
26 | local AceDB3 = LibStub('AceDB-3.0', true)
27 | local AceDBOptions3 = LibStub('AceDBOptions-3.0', true)
28 | local AceConfigRegistry3 = LibStub('AceConfigRegistry-3.0', true)
29 |
30 | local L_ENABLED = "Включить профили раскладки талантов"
31 | local L_ENABLED_DESC = "Если включено, ваш профиль будет зависеть от выбранной раскладки талантов."
32 | local L_CURRENT = "%s (Текущий)"
33 |
34 | local idToString = {
35 | [1] = "Первый провиль",
36 | [2] = "Второй профиль",
37 | [3] = "Третий профиль",
38 | [4] = "Четверный профиль",
39 | [5] = "Пятый профиль",
40 | [6] = "Шестой профиль",
41 | [7] = "Седьмой профиль",
42 | [8] = "Восьмой профиль",
43 | [9] = "Девятый профиль",
44 | [10] = "Десятый профиль",
45 | }
46 |
47 | function mixin:IsDualSpecEnabled()
48 | return registry[self].db.char.enabled
49 | end
50 |
51 | function mixin:SetDualSpecEnabled(enabled)
52 | local db = registry[self].db.char
53 | db.enabled = not not enabled
54 |
55 | local currentProfile = self:GetCurrentProfile()
56 | for i = 1, C_Talent.GetNumTalentGroups() do
57 | db[i] = enabled and (db[i] or currentProfile) or nil
58 | end
59 |
60 | self:CheckDualSpecState()
61 | end
62 |
63 | function mixin:GetDualSpecProfile(talent)
64 | return registry[self].db.char[talent or lib.currentSpec] or self:GetCurrentProfile()
65 | end
66 |
67 | function mixin:SetDualSpecProfile(profileName, talent)
68 | talent = talent or lib.currentSpec
69 | if talent > C_Talent.GetNumTalentGroups() then return end
70 |
71 | registry[self].db.char[talent] = profileName
72 | self:CheckDualSpecState()
73 | end
74 |
75 | function mixin:CheckDualSpecState()
76 | if not registry[self].db.char.enabled then return end
77 | if lib.currentSpec == 0 then return end
78 |
79 | local profileName = self:GetDualSpecProfile()
80 | if profileName ~= self:GetCurrentProfile() then
81 | self:SetProfile(profileName)
82 | end
83 | end
84 |
85 | local function EmbedMixin(target)
86 | for k,v in next, mixin do
87 | rawset(target, k, v)
88 | end
89 | end
90 |
91 | local function UpgradeDatabase(target)
92 | if lib.currentSpec == 0 then
93 | upgrades[target] = true
94 | return
95 | end
96 |
97 | local db = target:GetNamespace(MAJOR, true)
98 | if db and db.char.profile then
99 | for i = 1, C_Talent.GetNumTalentGroups() do
100 | if i == lib.currentSpec then
101 | db.char[i] = target:GetCurrentProfile()
102 | else
103 | db.char[i] = db.char.profile
104 | end
105 | end
106 | db.char.profile = nil
107 | db.char.specGroup = nil
108 | end
109 | end
110 |
111 | function lib:OnProfileDeleted(event, target, profileName)
112 | local db = registry[target].db.char
113 | if not db.enabled then return end
114 |
115 | for i = 1, C_Talent.GetNumTalentGroups() do
116 | if db[i] == profileName then
117 | db[i] = target:GetCurrentProfile()
118 | end
119 | end
120 | end
121 |
122 | function lib:_EnhanceDatabase(event, target)
123 | registry[target].db = target:GetNamespace(MAJOR, true) or target:RegisterNamespace(MAJOR)
124 | EmbedMixin(target)
125 | target:CheckDualSpecState()
126 | end
127 |
128 | function lib:EnhanceDatabase(target, name)
129 | AceDB3 = AceDB3 or LibStub('AceDB-3.0', true)
130 | if type(target) ~= "table" then
131 | error("Usage: LibDualSpec:EnhanceDatabase(target, name): target should be a table.", 2)
132 | elseif type(name) ~= "string" then
133 | error("Usage: LibDualSpec:EnhanceDatabase(target, name): name should be a string.", 2)
134 | elseif not AceDB3 or not AceDB3.db_registry[target] then
135 | error("Usage: LibDualSpec:EnhanceDatabase(target, name): target should be an AceDB-3.0 database.", 2)
136 | elseif target.parent then
137 | error("Usage: LibDualSpec:EnhanceDatabase(target, name): cannot enhance a namespace.", 2)
138 | elseif registry[target] then
139 | return
140 | end
141 | registry[target] = { name = name }
142 | UpgradeDatabase(target)
143 | lib:_EnhanceDatabase("EnhanceDatabase", target)
144 | target.RegisterCallback(lib, "OnDatabaseReset", "_EnhanceDatabase")
145 | target.RegisterCallback(lib, "OnProfileDeleted")
146 | end
147 |
148 | options.new = {
149 | name = "New",
150 | type = "input",
151 | order = 30,
152 | get = false,
153 | set = function(info, value)
154 | local db = info.handler.db
155 | if db:IsDualSpecEnabled() then
156 | db:SetDualSpecProfile(value, lib.currentSpec)
157 | else
158 | db:SetProfile(value)
159 | end
160 | end,
161 | }
162 |
163 | options.choose = {
164 | name = "Existing Profiles",
165 | type = "select",
166 | order = 40,
167 | get = "GetCurrentProfile",
168 | set = "SetProfile",
169 | values = "ListProfiles",
170 | arg = "common",
171 | disabled = function(info)
172 | return info.handler.db:IsDualSpecEnabled()
173 | end
174 | }
175 |
176 | options.enabled = {
177 | name = "|cffffd200"..L_ENABLED.."|r",
178 | desc = L_ENABLED_DESC,
179 | descStyle = "inline",
180 | type = "toggle",
181 | order = 41,
182 | width = "full",
183 | get = function(info) return info.handler.db:IsDualSpecEnabled() end,
184 | set = function(info, value) info.handler.db:SetDualSpecEnabled(value) end,
185 | }
186 |
187 | function lib:EnhanceOptions(optionTable, target)
188 | AceDBOptions3 = AceDBOptions3 or LibStub('AceDBOptions-3.0', true)
189 | AceConfigRegistry3 = AceConfigRegistry3 or LibStub('AceConfigRegistry-3.0', true)
190 | if type(optionTable) ~= "table" then
191 | error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable should be a table.", 2)
192 | elseif type(target) ~= "table" then
193 | error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): target should be a table.", 2)
194 | elseif not AceDBOptions3 or not AceDBOptions3.optionTables[target] then
195 | error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable is not an AceDBOptions-3.0 table.", 2)
196 | elseif optionTable.handler.db ~= target then
197 | error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable must be the option table of target.", 2)
198 | elseif not registry[target] then
199 | error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): EnhanceDatabase should be called before EnhanceOptions(optionTable, target).", 2)
200 | end
201 |
202 | options.new.name = optionTable.args.new.name
203 | options.new.desc = optionTable.args.new.desc
204 | options.choose.name = optionTable.args.choose.name
205 | options.choose.desc = optionTable.args.choose.desc
206 |
207 | if not optionTable.plugins then
208 | optionTable.plugins = {}
209 | end
210 | optionTable.plugins[MAJOR] = options
211 | end
212 |
213 | for target in next, registry do
214 | UpgradeDatabase(target)
215 | EmbedMixin(target)
216 | target:CheckDualSpecState()
217 | local optionTable = AceDBOptions3 and AceDBOptions3.optionTables[target]
218 | if optionTable then
219 | lib:EnhanceOptions(optionTable, target)
220 | end
221 | end
222 |
223 | local function iterator(registry, key)
224 | local data
225 | key, data = next(registry, key)
226 | if key then
227 | return key, data.name
228 | end
229 | end
230 |
231 | function lib:IterateDatabases()
232 | return iterator, lib.registry
233 | end
234 |
235 | local function eventHandler(self, event)
236 | lib.currentSpec = C_Talent.GetActiveTalentGroup()
237 |
238 | if event == "PLAYER_LOGIN" then
239 | self:UnregisterEvent(event)
240 | self:RegisterEvent("PLAYER_TALENT_UPDATE")
241 | end
242 |
243 | for i = 1, C_Talent.GetNumTalentGroups() do
244 | if not options["specProfile" .. i] then
245 | options["specProfile" .. i] = {
246 | type = "select",
247 | name = function() return lib.currentSpec == i and L_CURRENT:format(idToString[i]) or idToString[i] end,
248 | order = 42 + i,
249 | get = function(info) return info.handler.db:GetDualSpecProfile(i) end,
250 | set = function(info, value) info.handler.db:SetDualSpecProfile(value, i) end,
251 | values = "ListProfiles",
252 | arg = "common",
253 | disabled = function(info) return not info.handler.db:IsDualSpecEnabled() end,
254 | }
255 | end
256 | end
257 |
258 | if lib.currentSpec > 0 and next(upgrades) then
259 | for target in next, upgrades do
260 | UpgradeDatabase(target)
261 | end
262 | wipe(upgrades)
263 | end
264 |
265 | for target in next, registry do
266 | target:CheckDualSpecState()
267 | end
268 |
269 | if AceConfigRegistry3 and next(registry) then
270 | for appName in AceConfigRegistry3:IterateOptionsTables() do
271 | AceConfigRegistry3:NotifyChange(appName)
272 | end
273 | end
274 | end
275 |
276 | lib.eventFrame:SetScript("OnEvent", eventHandler)
277 | if IsLoggedIn() then
278 | eventHandler(lib.eventFrame, "PLAYER_LOGIN")
279 | else
280 | lib.eventFrame:RegisterEvent("PLAYER_LOGIN")
281 | end
--------------------------------------------------------------------------------