from retail

This commit is contained in:
NoM0Re
2025-01-19 14:54:14 +01:00
parent dccd22b610
commit 87c681b2f3
10 changed files with 62 additions and 25 deletions
+5 -5
View File
@@ -8,11 +8,11 @@ local debugLogs = {}
local enabled = {}
Private.DebugLog = {
-- Print
-- Clear
-- SetEnabled
-- IsEnabled
-- GetLogs
Print = function(uid, text, ...) end,
Clear = function(uid) end,
SetEnabled = function(uid, enabled) end,
IsEnabled = function(uid) end,
GetLogs = function(uid) end
}
local function serialize(log, input)
+18 -3
View File
@@ -311,13 +311,25 @@ local function PrintOneProfile(popup, name, map, total)
end
local percent = ""
if total then
percent = ", " .. string.format("%.2f", 100 * map.elapsed / total) .. "%"
percent = (", %.2f%%"):format(100 * map.elapsed / total)
end
local spikeInfo = ""
if map.spike then
spikeInfo = string.format("(%.2fms)", map.spike)
local r, g, b
if map.spike < 2 then
r, g, b = WeakAuras.GetHSVTransition(map.spike / 2, 0, 1, 0, 1, 1, 1, 0, 1)
elseif map.spike < 2.5 then
r, g, b = WeakAuras.GetHSVTransition((map.spike - 2) * 2, 1, 1, 0, 1, 1, 0.65, 0, 1)
elseif map.spike < 3 then
r, g, b = WeakAuras.GetHSVTransition((map.spike - 2.5) * 2, 1, 0.65, 0, 1, 1, 0, 0, 1)
else
r, g, b = 1, 0, 0
end
spikeInfo = ("|cff%02x%02x%02x(%.2fms)|r"):format(r * 255, g * 255, b * 255, map.spike)
end
popup:AddText(string.format("%s |cff999999%.2fms%s %s|r", name, map.elapsed, percent, spikeInfo))
popup:AddText(("%s |cff999999%.2fms%s %s|r"):format(name, map.elapsed, percent, spikeInfo))
end
local function SortProfileMap(map)
@@ -327,6 +339,9 @@ local function SortProfileMap(map)
end
sort(result, function(a, b)
if map[a].spike and map[b].spike then
return map[a].spike > map[b].spike
end
return map[a].elapsed > map[b].elapsed
end)
+2
View File
@@ -43,6 +43,8 @@ local default = {
columnSpace = 1
}
Private.regionPrototype.AddAlphaToDefault(default);
local controlPointFunctions = {
["SetAnchorPoint"] = function(self, point, relativeFrame, relativePoint, offsetX, offsetY)
self:ClearAllPoints();
+2
View File
@@ -22,6 +22,8 @@ local default = {
scale = 1,
};
Private.regionPrototype.AddAlphaToDefault(default);
-- Called when first creating a new region/display
local function create(parent)
-- Main region
+1 -2
View File
@@ -4,8 +4,7 @@ local AddonName, Private = ...
local WeakAuras = WeakAuras
local L = WeakAuras.L
local SubscribableObject =
{
local SubscribableObject ={
ClearSubscribers = function(self)
self.events = {}
self.subscribers = {}
+5
View File
@@ -1034,6 +1034,9 @@ do -- Archive stuff
error(string.format(L["Could not load WeakAuras Archive, the addon is %s"], reason))
end
end
if type(WeakAurasArchive) ~= "table" then
WeakAurasArchive = {}
end
Archivist:Initialize(WeakAurasArchive)
end
return Archivist
@@ -1164,6 +1167,8 @@ loadedFrame:SetScript("OnEvent", function(self, event, addon)
db.displays = db.displays or {};
db.registered = db.registered or {};
db.migrationCutoff = db.migrationCutoff or 730
db.historyCutoff = db.historyCutoff or 730
Private.SyncParentChildRelationships();
local isFirstUIDValidation = db.dbVersion == nil or db.dbVersion < 26;
-12
View File
@@ -1,12 +0,0 @@
-- all this is is a frame that ensures that the SV is a table type
local addonName = ...
local loader = CreateFrame("FRAME")
loader:RegisterEvent("ADDON_LOADED")
loader:SetScript("OnEvent", function(self, _, addon)
if addon == addonName then
if type(WeakAurasArchive) ~= "table" then
WeakAurasArchive = {}
end
self:UnregisterEvent("ADDON_LOADED")
end
end)
-2
View File
@@ -3,5 +3,3 @@
## LoadOnDemand: 1
## SavedVariables: WeakAurasArchive
## Dependencies: WeakAuras
WeakAurasArchive.lua
@@ -516,6 +516,12 @@ local function createOptions(id, data)
name = L["Animated Expand and Collapse"],
order = 27
},
spacer = {
type = "description",
width = WeakAuras.normalWidth,
name = "",
order = 27.5
},
scale = {
type = "range",
control = "WeakAurasSpinBox",
@@ -539,6 +545,17 @@ local function createOptions(id, data)
OptionsPrivate.ResetMoverSizer();
end
},
alpha = {
type = "range",
control = "WeakAurasSpinBox",
width = WeakAuras.normalWidth,
name = L["Group Alpha"],
order = 29,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true
},
endHeader = {
type = "header",
order = 100,
+11
View File
@@ -585,6 +585,17 @@ local function createOptions(id, data)
OptionsPrivate.ResetMoverSizer();
end
},
alpha = {
type = "range",
control = "WeakAurasSpinBox",
width = WeakAuras.normalWidth,
name = L["Group Alpha"],
order = 46,
min = 0,
max = 1,
bigStep = 0.01,
isPercent = true
},
endHeader = {
type = "header",
order = 100,