Skip to content

Commit

Permalink
13.58
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Feb 11, 2024
2 parents 8e5ac82 + e13fd42 commit 8b82c16
Show file tree
Hide file tree
Showing 17 changed files with 228 additions and 149 deletions.
213 changes: 139 additions & 74 deletions ElvUI/Classic/Filters/Filters.lua

Large diffs are not rendered by default.

69 changes: 37 additions & 32 deletions ElvUI/Classic/Modules/Blizzard/ColorPicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ local function UpdateAlphaText(alpha)
_G.ColorPPBoxA:SetText(alpha)
end

local function UpdateAlpha(tbox)
local num = tbox:GetNumber()
if num > 100 then
tbox:SetText(100)
num = 100
end

_G.OpacitySliderFrame:SetValue(1 - (num * 0.01))
end

local function expandFromThree(r, g, b)
return strjoin('',r,r,g,g,b,b)
end
Expand Down Expand Up @@ -117,27 +107,7 @@ local function delayCall()
end

local last = {r = 0, g = 0, b = 0, a = 0}
local function onColorSelect(frame, r, g, b)
if frame.noColorCallback then
return -- prevent error from E:GrabColorPickerValues, better note in that function
elseif r ~= last.r or g ~= last.g or b ~= last.b then
last.r, last.g, last.b = r, g, b
else -- colors match so we don't need to update, most likely mouse is held down
return
end

_G.ColorSwatch:SetColorTexture(r, g, b)
UpdateColorTexts(r, g, b)

if not frame:IsVisible() then
delayCall()
elseif not delayFunc then
delayFunc = ColorPickerFrame.func
E:Delay(delayWait, delayCall)
end
end

local function onValueChanged(_, value)
local function onAlphaValueChanged(_, value)
local alpha = alphaValue(value)
if last.a ~= alpha then
last.a = alpha
Expand All @@ -160,13 +130,48 @@ local function onValueChanged(_, value)
end
end

local function UpdateAlpha(tbox)
local num = tbox:GetNumber()
if num > 100 then
tbox:SetText(100)
num = 100
end

local value = 1 - (num * 0.01)
_G.OpacitySliderFrame:SetValue(value)
-- onAlphaValueChanged(nil, value)
end

local function onColorSelect(frame, r, g, b)
if frame.noColorCallback then
return -- prevent error from E:GrabColorPickerValues, better note in that function
elseif r ~= last.r or g ~= last.g or b ~= last.b then
last.r, last.g, last.b = r, g, b
else -- colors match so we don't need to update, most likely mouse is held down
return
end

_G.ColorSwatch:SetColorTexture(r, g, b)
UpdateColorTexts(r, g, b)
-- UpdateAlphaText()

if not frame:IsVisible() then
delayCall()
elseif not delayFunc then -- ColorPickerFrame.func is from stock Ace3 widget not the ElvUI variant
delayFunc = ColorPickerFrame.swatchFunc or ColorPickerFrame.func
E:Delay(delayWait, delayCall)
end
end

function BL:EnhanceColorPicker()
if E:IsAddOnEnabled('ColorPickerPlus') then return end

if E.Retail then
ColorPickerFrame.Border:Hide()
end

ColorPickerFrame.swatchFunc = E.noop -- REMOVE THIS LATER IF WE CAN? errors on Footer.OkayButton

local Header = ColorPickerFrame.Header or _G.ColorPickerFrameHeader
Header:StripTextures()
Header:ClearAllPoints()
Expand All @@ -184,7 +189,7 @@ function BL:EnhanceColorPicker()

-- Memory Fix, Colorpicker will call the self.func() 100x per second, causing fps/memory issues,
-- We overwrite these two scripts and set a limit on how often we allow a call their update functions
_G.OpacitySliderFrame:SetScript('OnValueChanged', onValueChanged)
_G.OpacitySliderFrame:SetScript('OnValueChanged', onAlphaValueChanged)

-- Keep the colors updated
ColorPickerFrame:SetScript('OnColorSelect', onColorSelect)
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Core/General/StatusReport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function E:UpdateStatusFrame()
if E.Retail then
Section3.Content.Line6.Text:SetFormattedText('Specialization: |cff4beb2c%s|r', GetSpecName() or UNKNOWN)
elseif E.Classic then
Section3.Content.Line6.Text:SetFormattedText('Hardcore: |cff4beb2c%s|r', E.ClassicHC and 'Yes' or 'No')
Section3.Content.Line6.Text:SetFormattedText('Game Mode: |cff4beb2c%s|r', E.ClassicHC and 'Hardcore' or E.ClassicSOD and 'Seasonal' or 'Normal')
end

StatusFrame.TitleLogoFrame.LogoTop:SetVertexColor(unpack(E.media.rgbvaluecolor))
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/ElvUI_Classic.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bClassic|r
## Notes: User Interface Replacement
## Author: Elv, Simpy
## Version: 13.57
## Version: 13.58
## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/ElvUI_Mainline.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r
## Notes: User Interface Replacement
## Author: Elv, Simpy
## Version: 13.57
## Version: 13.58
## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/ElvUI_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bWrath|r
## Notes: User Interface Replacement
## Author: Elv, Simpy
## Version: 13.57
## Version: 13.58
## SavedVariables: ElvDB, ElvPrivateDB
## SavedVariablesPerCharacter: ElvCharacterDB
## OptionalDeps: SharedMedia, Tukui, Masque
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Mainline/Modules/Blizzard/ColorPicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ local function onColorSelect(frame, r, g, b)
if not frame:IsVisible() then
delayCall()
elseif not delayFunc then
delayFunc = ColorPickerFrame.func
delayFunc = ColorPickerFrame.swatchFunc

if delayFunc then
E:Delay(delayWait, delayCall)
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Libraries/Core/Ace3/AceGUI-3.0/AceGUI-3.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- Widgets -->
<Script file="widgets\AceGUIWidget-Button-ElvUI.lua"/>
<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
<Script file="widgets\AceGUIWidget-ColorPicker-ElvUI.lua"/>
<Script file="widgets\AceGUIWidget-DropDown.lua"/>
<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
<Script file="widgets\AceGUIWidget-EditBox-ElvUI.lua"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker-ElvUI", 27
local Type, Version = "ColorPicker-ElvUI", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

local IsRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE

local pairs = pairs

local CreateFrame, UIParent = CreateFrame, UIParent
Expand All @@ -21,6 +23,12 @@ local function ColorCallback(self, r, g, b, a, isAlpha)
-- which is caused when we set values into the color picker again on `OnValueChanged`
if ColorPickerFrame.noColorCallback then return end

-- no change, skip update
if r == self.r and g == self.g and b == self.b and a == self.a then
return
end

-- no alpha option
if not self.HasAlpha then
a = 1
end
Expand Down Expand Up @@ -57,12 +65,13 @@ local function ColorSwatch_OnClick(frame)
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
ColorPickerFrame:SetClampedToScreen(true)
ColorPickerFrame:EnableMouse(true) -- Make sure the background isn't click-through

ColorPickerFrame.func = function()
ColorPickerFrame.swatchFunc = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
local alpha

if ColorPickerFrame.GetColorAlpha then
if IsRetail then
alpha = ColorPickerFrame:GetColorAlpha()
else
alpha = 1 - OpacitySliderFrame:GetValue()
Expand All @@ -76,7 +85,7 @@ local function ColorSwatch_OnClick(frame)
local r, g, b = ColorPickerFrame:GetColorRGB()
local alpha

if ColorPickerFrame.GetColorAlpha then
if IsRetail then
alpha = ColorPickerFrame:GetColorAlpha()
else
alpha = 1 - OpacitySliderFrame:GetValue()
Expand All @@ -87,7 +96,7 @@ local function ColorSwatch_OnClick(frame)

local r, g, b, a = self.r, self.g, self.b, self.a
if self.HasAlpha then
ColorPickerFrame.opacity = (ColorPickerFrame.GetColorAlpha and (a or 0)) or (1 - (a or 0))
ColorPickerFrame.opacity = (IsRetail and (a or 0)) or (1 - (a or 0))
end

if ColorPickerFrame.Content and ColorPickerFrame.Content.ColorPicker then
Expand All @@ -100,7 +109,7 @@ local function ColorSwatch_OnClick(frame)
if ColorPPDefault and self.dR and self.dG and self.dB then
local alpha = 1
if self.dA then
alpha = (ColorPickerFrame.GetColorAlpha and self.dA) or (1 - self.dA)
alpha = (IsRetail and self.dA) or (1 - self.dA)
end

if not ColorPPDefault.colors then
Expand All @@ -111,7 +120,7 @@ local function ColorSwatch_OnClick(frame)
end

ColorPickerFrame.cancelFunc = function()
ColorPickerFrame.func = nil
ColorPickerFrame.swatchFunc = nil
ColorPickerFrame.opacityFunc = nil

ColorCallback(self, r, g, b, a, true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- License: LICENSE.txt

local MAJOR_VERSION = "LibActionButton-1.0-ElvUI"
local MINOR_VERSION = 49 -- the real minor version is 108
local MINOR_VERSION = 50 -- the real minor version is 110

local LibStub = LibStub
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
Expand Down Expand Up @@ -2654,11 +2654,11 @@ Action.GetSpellId = function(self)
end
end
Action.GetLossOfControlCooldown = function(self) return GetActionLossOfControlCooldown(self._state_action) end
if C_UnitAuras then
if C_UnitAuras and C_UnitAuras.GetCooldownAuraBySpellID then
Action.GetPassiveCooldownSpellID = function(self)
local _actionType, actionID = GetActionInfo(self._state_action)
local onEquipPassiveSpellID
if actionID and not WoWClassic then
if actionID and C_ActionBar and C_ActionBar.GetItemActionOnEquipSpellID then
onEquipPassiveSpellID = C_ActionBar.GetItemActionOnEquipSpellID(self._state_action)
end
if onEquipPassiveSpellID then
Expand Down
42 changes: 21 additions & 21 deletions ElvUI_Libraries/Core/LibRangeCheck-3.0/LibRangeCheck-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ License: MIT
-- @class file
-- @name LibRangeCheck-3.0
local MAJOR_VERSION = "LibRangeCheck-3.0"
local MINOR_VERSION = 9
local MINOR_VERSION = 12

-- GLOBALS: LibStub, CreateFrame

Expand All @@ -52,6 +52,7 @@ end

local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
local isWrath = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
local isEra = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC

local next = next
local type = type
Expand Down Expand Up @@ -86,11 +87,12 @@ local GetTime = GetTime
local HandSlotId = GetInventorySlotInfo("HANDSSLOT")
local math_floor = math.floor
local UnitIsVisible = UnitIsVisible
local Item = Item

local C_Timer_NewTicker = C_Timer.NewTicker

local InCombatLockdownRestriction
if isRetail then
if isRetail or isEra then
InCombatLockdownRestriction = function(unit) return InCombatLockdown() and not UnitCanAttack("player", unit) end
else
InCombatLockdownRestriction = function() return false end
Expand Down Expand Up @@ -527,8 +529,8 @@ end

-- temporary stuff

local pendingItemRequest
local itemRequestTimeoutAt
local pendingItemRequest = {}
local itemRequestTimeoutAt = {}
local foundNewItems
local cacheAllItems
local friendItemRequests
Expand Down Expand Up @@ -678,7 +680,7 @@ local function createCheckerList(spellList, itemList, interactList)
for range, items in pairs(itemList) do
for i = 1, #items do
local item = items[i]
if GetItemInfo(item) then
if Item:CreateFromItemID(item):IsItemDataCached() and GetItemInfo(item) then
addChecker(res, range, nil, checkers_Item[item], "item:" .. item)
break
end
Expand Down Expand Up @@ -1233,8 +1235,9 @@ end

function lib:GET_ITEM_INFO_RECEIVED(event, item, success)
-- print("### GET_ITEM_INFO_RECEIVED: " .. tostring(item) .. ", " .. tostring(success))
if item == pendingItemRequest then
pendingItemRequest = nil
if pendingItemRequest[item] then
pendingItemRequest[item] = nil
itemRequestTimeoutAt[item] = nil
if not success then
self.failedItemRequests[item] = true
end
Expand All @@ -1253,40 +1256,37 @@ function lib:processItemRequests(itemRequests)
if not i then
itemRequests[range] = nil
break
elseif self.failedItemRequests[item] then
elseif Item:CreateFromItemID(item):IsItemEmpty() or self.failedItemRequests[item] then
-- print("### processItemRequests: failed: " .. tostring(item))
tremove(items, i)
elseif item == pendingItemRequest and GetTime() < itemRequestTimeoutAt then
elseif pendingItemRequest[item] and GetTime() < itemRequestTimeoutAt[item] then
return true -- still waiting for server response
elseif GetItemInfo(item) then
-- print("### processItemRequests: found: " .. tostring(item))
if itemRequestTimeoutAt then
-- print("### processItemRequests: new: " .. tostring(item))
foundNewItems = true
itemRequestTimeoutAt = nil
pendingItemRequest = nil
end
foundNewItems = true
itemRequestTimeoutAt[item] = nil
pendingItemRequest[item] = nil
if not cacheAllItems then
itemRequests[range] = nil
break
end
tremove(items, i)
elseif not itemRequestTimeoutAt then
elseif not itemRequestTimeoutAt[item] then
-- print("### processItemRequests: waiting: " .. tostring(item))
itemRequestTimeoutAt = GetTime() + ItemRequestTimeout
pendingItemRequest = item
itemRequestTimeoutAt[item] = GetTime() + ItemRequestTimeout
pendingItemRequest[item] = true
if not self.frame:IsEventRegistered("GET_ITEM_INFO_RECEIVED") then
self.frame:RegisterEvent("GET_ITEM_INFO_RECEIVED")
end
return true
elseif GetTime() >= itemRequestTimeoutAt then
elseif GetTime() >= itemRequestTimeoutAt[item] then
-- print("### processItemRequests: timeout: " .. tostring(item))
if cacheAllItems then
print(MAJOR_VERSION .. ": timeout for item: " .. tostring(item))
end
self.failedItemRequests[item] = true
itemRequestTimeoutAt = nil
pendingItemRequest = nil
itemRequestTimeoutAt[item] = nil
pendingItemRequest[item] = nil
tremove(items, i)
else
return true -- still waiting for server response
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Libraries/ElvUI_Libraries_Classic.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r
## Notes: Libraries that power ElvUI
## Author: Elv, Simpy
## Version: 13.57
## Version: 13.58
## Interface: 11501
## OptionalDeps: LibHealComm-4.0
## X-oUF: ElvUF
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Libraries/ElvUI_Libraries_Mainline.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Title: |cff1784d1ElvUI|r |cfd9b9b9bLibraries|r
## Notes: Libraries that power ElvUI
## Author: Elv, Simpy
## Version: 13.57
## Version: 13.58
## Interface: 100205
## X-oUF: ElvUF
## IconTexture: Interface\AddOns\ElvUI\Core\Media\Textures\LogoAddon
Expand Down
Loading

0 comments on commit 8b82c16

Please sign in to comment.