Commit 2f104c04 authored by Simpy's avatar Simpy 🐹

12.03

parents becdb7f2 bc66cfc1
......@@ -148,6 +148,7 @@ function E:SetupCVars(noDisplayMsg)
SetCVar('chatStyle', 'classic')
SetCVar('wholeChatWindowClickable', 0)
SetCVar('showTutorials', 0)
SetCVar('showNPETutorials', 0)
SetCVar('UberTooltips', 1)
SetCVar('threatWarning', 3)
SetCVar('alwaysShowActionBars', 1)
......
## Interface: 90001
## Author: Elv, Simpy
## Version: 12.02
## Version: 12.03
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -211,8 +211,7 @@ local function Visibility(self, event, unit)
element.__barInfo = barInfo
if(barInfo and (barInfo.showOnRaid and (UnitInParty(unit) or UnitInRaid(unit))
or not barInfo.hideFromOthers
or UnitIsUnit(unit, 'player')
or UnitIsUnit(self.realUnit, 'player')))
or UnitIsUnit(unit, 'player')))
then
self:RegisterEvent('UNIT_POWER_UPDATE', Path)
self:RegisterEvent('UNIT_MAXPOWER', Path)
......
......@@ -2,8 +2,8 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local AB = E:GetModule('ActionBars')
local _G = _G
local unpack = unpack
local ipairs, pairs, select = ipairs, pairs, select
local unpack, next, tremove = unpack, next, tremove
local ipairs, pairs, select, strmatch = ipairs, pairs, select, strmatch
local format, gsub, strsplit, strfind = format, gsub, strsplit, strfind
local ClearOverrideBindings = ClearOverrideBindings
......@@ -857,6 +857,23 @@ function AB:SpellButtonOnLeave()
SpellBookTooltip:SetScript('OnUpdate', nil)
end
function AB:ButtonEventsRegisterFrame(added)
local frames = _G.ActionBarButtonEventsFrame.frames
for index = #frames, 1, -1 do
local frame = frames[index]
local wasAdded = frame == added
if not added or wasAdded then
if not strmatch(frame:GetName(), 'ExtraActionButton%d') then
tremove(_G.ActionBarButtonEventsFrame.frames, index)
end
if wasAdded then
break
end
end
end
end
function AB:DisableBlizzard()
-- dont blindly add to this table, the first 5 get their events registered
for i, name in ipairs({'OverrideActionBar', 'StanceBarFrame', 'PossessBarFrame', 'PetActionBarFrame', 'MultiCastActionBarFrame', 'MainMenuBar', 'MicroButtonAndBagsBar', 'MultiBarBottomLeft', 'MultiBarBottomRight', 'MultiBarLeft', 'MultiBarRight'}) do
......@@ -890,6 +907,10 @@ function AB:DisableBlizzard()
_G.ActionBarController:UnregisterAllEvents()
_G.ActionBarController:RegisterEvent('UPDATE_EXTRA_ACTIONBAR') -- this is needed to let the ExtraActionBar show
-- lets only keep ExtraActionButtons in here
hooksecurefunc(_G.ActionBarButtonEventsFrame, 'RegisterFrame', AB.ButtonEventsRegisterFrame)
AB.ButtonEventsRegisterFrame()
-- this would taint along with the same path as the SetNoopers: ValidateActionBarTransition
_G.VerticalMultiBarsContainer:Size(10, 10) -- dummy values so GetTop etc doesnt fail without replacing
AB:SetNoopsi(_G.VerticalMultiBarsContainer)
......@@ -1228,6 +1249,10 @@ function AB:LAB_CooldownUpdate(button, _, duration)
end
end
function AB:PLAYER_ENTERING_WORLD()
AB:AdjustMaxStanceButtons('PLAYER_ENTERING_WORLD')
end
function AB:Initialize()
AB.db = E.db.actionbar
......@@ -1270,6 +1295,7 @@ function AB:Initialize()
AB:ToggleCooldownOptions()
AB:LoadKeyBinder()
AB:RegisterEvent('PLAYER_ENTERING_WORLD')
AB:RegisterEvent('UPDATE_BINDINGS', 'ReassignBindings')
AB:RegisterEvent('PET_BATTLE_CLOSE', 'ReassignBindings')
AB:RegisterEvent('PET_BATTLE_OPENING_DONE', 'RemoveBindings')
......
......@@ -316,19 +316,23 @@ function AB:AdjustMaxStanceButtons(event)
self:PositionAndSizeBarShapeShift()
-- sometimes after combat lock down `event` may be true because of passing it back with `AB.NeedsAdjustMaxStanceButtons`
if event == 'UPDATE_SHAPESHIFT_FORMS' then
if event == 'UPDATE_SHAPESHIFT_FORMS' or event == 'PLAYER_ENTERING_WORLD' then
self:StyleShapeShift()
end
end
function AB:UpdateStanceBindings()
for i = 1, NUM_STANCE_SLOTS do
local button = _G['ElvUI_StanceBarButton'..i]
if not button then break end
if self.db.hotkeytext then
_G['ElvUI_StanceBarButton'..i..'HotKey']:Show()
_G['ElvUI_StanceBarButton'..i..'HotKey']:SetText(GetBindingKey('SHAPESHIFTBUTTON'..i))
self:FixKeybindText(_G['ElvUI_StanceBarButton'..i])
button.HotKey:Show()
button.HotKey:SetText(GetBindingKey('SHAPESHIFTBUTTON'..i))
self:FixKeybindText(button)
else
_G['ElvUI_StanceBarButton'..i..'HotKey']:Hide()
button.HotKey:Hide()
end
end
end
......@@ -345,12 +349,9 @@ function AB:CreateBarShapeShift()
self:RegisterEvent('UPDATE_SHAPESHIFT_COOLDOWN')
self:RegisterEvent('UPDATE_SHAPESHIFT_FORMS', 'AdjustMaxStanceButtons')
self:RegisterEvent('UPDATE_SHAPESHIFT_USABLE', 'StyleShapeShift')
self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', 'StyleShapeShift')
self:RegisterEvent('UPDATE_SHAPESHIFT_USABLE', 'StyleShapeShift')
self:RegisterEvent('ACTIONBAR_PAGE_CHANGED', 'StyleShapeShift')
E:CreateMover(bar, 'ShiftAB', L["Stance Bar"], nil, -3, nil, 'ALL,ACTIONBARS', nil, 'actionbar,stanceBar', true)
self:AdjustMaxStanceButtons()
self:StyleShapeShift()
self:UpdateStanceBindings()
end
......@@ -3,8 +3,8 @@ local DB = E:GetModule('DataBars')
local LSM = E.Libs.LSM
local _G = _G
local unpack = unpack
local pairs, select = pairs, select
local unpack, select = unpack, select
local pairs, ipairs = pairs, ipairs
local CreateFrame = CreateFrame
local GetInstanceInfo = GetInstanceInfo
local IsPlayerAtEffectiveMaxLevel = IsPlayerAtEffectiveMaxLevel
......@@ -39,7 +39,7 @@ function DB:CreateBar(name, key, updateFunc, onEnter, onClick, points)
bar:Hide()
bar.barTexture = bar:GetStatusBarTexture()
bar.text = bar:CreateFontString(nil, 'OVERLAY')
bar.text = bar:CreateFontString(nil, 'OVERLAY', nil, 7)
bar.text:FontTemplate()
bar.text:Point('CENTER')
......@@ -58,7 +58,7 @@ function DB:CreateBarBubbles(bar)
bar.bubbles = {}
for i = 1, 19 do
bar.bubbles[i] = bar:CreateTexture(nil, 'OVERLAY')
bar.bubbles[i] = bar:CreateTexture(nil, 'OVERLAY', nil, 0)
bar.bubbles[i]:SetColorTexture(0, 0, 0)
end
end
......
......@@ -29,7 +29,7 @@ function DB:ExperienceBar_CheckQuests(questID, completedOnly)
if C_QuestLog_ShouldShowQuestRewards(questID) then
local isCompleted = C_QuestLog_ReadyForTurnIn(questID)
if completedOnly and isCompleted or (not completedOnly and not isCompleted) then
if not completedOnly or isCompleted then
QuestLogXP = QuestLogXP + GetQuestLogRewardXP()
end
end
......
......@@ -538,7 +538,7 @@ function DT:LoadDataTexts(...)
local data = DT.LoadedInfo
data.font, data.fontSize, data.fontOutline = LSM:Fetch('font', DT.db.font), DT.db.fontSize, DT.db.fontOutline
data.inInstance, data.instanceType = IsInInstance()
data.isInBattle = data.inInstance and (data.instanceType == 'pvp' or data.instanceType == 'arena')
data.isInBattle = data.inInstance and data.instanceType == 'pvp'
for panel, db in pairs(E.global.datatexts.customPanels) do
DT:UpdatePanelAttributes(panel, db, true)
......
......@@ -214,10 +214,10 @@ function S:Blizzard_AchievementUI(event)
AchievementFrame.backdrop:Point('BOTTOMRIGHT')
_G.AchievementFrameHeaderTitle:ClearAllPoints()
_G.AchievementFrameHeaderTitle:Point('TOPLEFT', AchievementFrame.backdrop, 'TOPLEFT', -45, -8)
_G.AchievementFrameHeaderTitle:Point('TOP', AchievementFrame.backdrop, 'TOP', 0, -8)
_G.AchievementFrameHeaderPoints:ClearAllPoints()
_G.AchievementFrameHeaderPoints:Point('LEFT', _G.AchievementFrameHeaderTitle, 'RIGHT', 2, 0)
_G.AchievementFrameHeaderPoints:Point('CENTER', _G.AchievementFrameHeaderTitle, 'CENTER', 0, 0)
--Backdrops
_G.AchievementFrameCategories:StripTextures()
......
......@@ -514,6 +514,8 @@ function S:Blizzard_Collections()
border:SetBackdropBorderColor(0.9, 0.9, 0.3)
elseif texture == 'transmog-wardrobe-border-unusable' then
border:SetBackdropBorderColor(0.9, 0.3, 0.3)
elseif Model.TransmogStateTexture:IsShown() then
border:SetBackdropBorderColor(1, 0.7, 1)
else
border:SetBackdropBorderColor(unpack(E.media.bordercolor))
end
......@@ -521,22 +523,30 @@ function S:Blizzard_Collections()
end
end
if Frame.PendingTransmogFrame then
Frame.PendingTransmogFrame.Glowframe:SetAtlas(nil)
Frame.PendingTransmogFrame.Glowframe:CreateBackdrop()
Frame.PendingTransmogFrame.Glowframe.backdrop:SetOutside()
Frame.PendingTransmogFrame.Glowframe.backdrop:SetBackdropColor(0, 0, 0, 0)
Frame.PendingTransmogFrame.Glowframe.backdrop:SetBackdropBorderColor(1, .77, 1, 1)
Frame.PendingTransmogFrame.Glowframe = Frame.PendingTransmogFrame.Glowframe.backdrop
local pending = Frame.PendingTransmogFrame
if pending then
local Glowframe = pending.Glowframe
Glowframe:SetAtlas(nil)
Glowframe:CreateBackdrop()
Glowframe.backdrop:SetPoint('TOPLEFT', pending, 'TOPLEFT', 0, 1) -- dont use set inside, left side needs to be 0
Glowframe.backdrop:SetPoint('BOTTOMRIGHT', pending, 'BOTTOMRIGHT', 1, -1)
Glowframe.backdrop:SetFrameLevel(pending:GetFrameLevel())
Glowframe.backdrop:SetBackdropBorderColor(1, 0.7, 1)
Glowframe.backdrop:SetBackdropColor(0, 0, 0, 0)
for i = 1, 12 do
if i < 5 then
Frame.PendingTransmogFrame['Smoke'..i]:Hide()
end
Frame.PendingTransmogFrame['Wisp'..i]:Hide()
end
end
if Frame.PagingFrame then
S:HandleNextPrevButton(Frame.PagingFrame.PrevPageButton, nil, nil, true)
S:HandleNextPrevButton(Frame.PagingFrame.NextPageButton, nil, nil, true)
local paging = Frame.PagingFrame
if paging then
S:HandleNextPrevButton(paging.PrevPageButton, nil, nil, true)
S:HandleNextPrevButton(paging.NextPageButton, nil, nil, true)
end
end
......
......@@ -37,11 +37,32 @@ local function ColorProgressBars(self, value)
end
-- 9.0 Needs Update
local function HotkeyShow(self)
local item = self:GetParent()
if item.rangeOverlay then item.rangeOverlay:Show() end
end
local function HotkeyHide(self)
local item = self:GetParent()
if item.rangeOverlay then item.rangeOverlay:Hide() end
end
local function HotkeyColor(self, r, g, b)
local item = self:GetParent()
if item.rangeOverlay then
if r == 0.6 and g == 0.6 and b == 0.6 then
item.rangeOverlay:SetVertexColor(0, 0, 0, 0)
else
item.rangeOverlay:SetVertexColor(.8, .1, .1, .5)
end
end
end
local function SkinItemButton(_, block)
local item = block.itemButton
if item and not item.skinned then
item:Size(25, 25)
if not item then return end
if not item.skinned then
item:CreateBackdrop('Transparent')
item.backdrop:SetAllPoints()
item:StyleButton()
item:SetNormalTexture(nil)
item.icon:SetTexCoord(unpack(E.TexCoords))
......@@ -51,9 +72,25 @@ local function SkinItemButton(_, block)
item.Count:Point('TOPLEFT', 1, -1)
item.Count:FontTemplate(nil, 14, 'OUTLINE')
item.Count:SetShadowOffset(5, -5)
local rangeOverlay = item:CreateTexture(nil, 'OVERLAY')
rangeOverlay:SetTexture(E.Media.Textures.White8x8)
rangeOverlay:SetInside()
item.rangeOverlay = rangeOverlay
hooksecurefunc(item.HotKey, 'Show', HotkeyShow)
hooksecurefunc(item.HotKey, 'Hide', HotkeyHide)
hooksecurefunc(item.HotKey, 'SetVertexColor', HotkeyColor)
HotkeyColor(item.HotKey, item.HotKey:GetTextColor())
item.HotKey:SetAlpha(0)
E:RegisterCooldown(item.Cooldown)
item.skinned = true
end
if item.backdrop then
item.backdrop:SetFrameLevel(item:GetFrameLevel() - 1)
end
end
-- 9.0 Needs Update
......
......@@ -185,7 +185,6 @@ function UF:Configure_HealComm(frame)
else
absorbBar:Point(p1, pred.otherBarTexture, p2)
end
else
local p1 = reverseFill and 'TOP' or 'BOTTOM'
local p2 = reverseFill and 'BOTTOM' or 'TOP'
......@@ -212,7 +211,6 @@ function UF:Configure_HealComm(frame)
else
absorbBar:Point(p1, pred.otherBarTexture, p2)
end
end
elseif frame:IsElementEnabled('HealthPrediction') then
frame:DisableElement('HealthPrediction')
......@@ -228,6 +226,11 @@ function UF:UpdateHealComm(_, _, _, absorb, _, hasOverAbsorb, hasOverHealAbsorb,
local healAbsorbBar = pred.healAbsorbBar
local absorbBar = pred.absorbBar
if frame.needsSizeUpdated then
UF:SetSize_HealComm(frame)
frame.needsSizeUpdated = nil
end
-- absorbs is set to none so hide both and kill code execution
if db.absorbStyle == 'NONE' then
healAbsorbBar:Hide()
......@@ -235,11 +238,6 @@ function UF:UpdateHealComm(_, _, _, absorb, _, hasOverAbsorb, hasOverHealAbsorb,
return
end
if frame.needsSizeUpdated then
UF:SetSize_HealComm(frame)
frame.needsSizeUpdated = nil
end
local colors = UF.db.colors.healPrediction
local maxOverflow = colors.maxOverflow or 0
......
......@@ -44,8 +44,8 @@ local function ToggleSkins(value)
end
end
E.Options.args.skins.args.disableBlizzardSkins = ACH:Execute(L["Disable Blizzard Skins"], nil, 3, function() ToggleSkins(false) end)
E.Options.args.skins.args.enableBlizzardSkins = ACH:Execute(L["Enable Blizzard Skins"], nil, 4, function() ToggleSkins(true) end)
E.Options.args.skins.args.disableBlizzardSkins = ACH:Execute(L["Disable Blizzard Skins"], nil, 3, function() ToggleSkins(false); E:StaticPopup_Show('PRIVATE_RL') end)
E.Options.args.skins.args.enableBlizzardSkins = ACH:Execute(L["Enable Blizzard Skins"], nil, 4, function() ToggleSkins(true); E:StaticPopup_Show('PRIVATE_RL') end)
E.Options.args.skins.args.blizzard = ACH:MultiSelect(L["Blizzard"], nil, -1, nil, nil, nil, function(_, key) return E.private.skins.blizzard[key] end, function(_, key, value) E.private.skins.blizzard[key] = value; E:StaticPopup_Show('PRIVATE_RL') end, function() return not E.private.skins.blizzard.enable end)
E.Options.args.skins.args.blizzard.sortByValue = true
E.Options.args.skins.args.blizzard.values = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment