from retail

diffchecked
This commit is contained in:
NoM0Re
2025-02-13 18:59:41 +01:00
parent 4c6277c667
commit 436041dd92
10 changed files with 39 additions and 21 deletions
@@ -574,7 +574,7 @@ local methods = {
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
self:SetTreeWidth(maxtreewidth, status.treesizable)
end
treeframe:SetMaxResize(maxtreewidth, 1600)
-- treeframe:SetMaxResize(maxtreewidth, 1600)
end,
["OnHeightSet"] = function(self, height)
@@ -1,7 +1,7 @@
if not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local tinsert, tremove, wipe = table.insert, table.remove, wipe
local tinsert, tremove = table.insert, table.remove
local select, pairs, type, unpack = select, pairs, type, unpack
local error = error
@@ -1139,12 +1139,12 @@ local methods = {
-- mark as being dragged, attach to mouse and raise frame strata
self.dragging = true
self.frame:StartMoving()
--self.frame:ClearAllPoints()
self.frame:ClearAllPoints()
self.frame.temp = {
parent = self.frame:GetParent(),
strata = self.frame:GetFrameStrata(),
}
--self.frame:SetParent(UIParent)
self.frame:SetParent(UIParent)
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
if self.data.id == mainAura.id then
self.frame:SetPoint("Center", UIParent, "BOTTOMLEFT", (x+w/2)*scale/uiscale, y/uiscale)
@@ -1916,7 +1916,9 @@ local function Constructor()
downgrouptexture:SetAllPoints(downgroup);
downgroup:SetNormalTexture(downgrouptexture);
downgroup:SetHighlightTexture("Interface\\BUTTONS\\UI-Panel-MinimizeButton-Highlight.blp");
downgroup:SetScript("OnEnter", function() Show_Tooltip(button, L["Move Down"], L["Move this display down in its group's order"]) end);
downgroup:SetScript("OnEnter", function()
Show_Tooltip(button, L["Move Down"], L["Move this display down in its group's order"])
end)
downgroup:SetScript("OnLeave", Hide_Tooltip);
downgroup:Hide();
@@ -50,15 +50,29 @@ local function Frame_OnShow(self)
if isHeader then
self:SetScript("OnClick", nil)
self.obj.text:SetTextColor(1, 1, 0)
self.obj.text:SetPoint("TOPLEFT", self, "TOPLEFT", 7, 0)
self.obj.icon:Hide()
self.obj.useHighlight = false
self.obj.text:ClearAllPoints()
self.obj.text:SetPoint("TOPLEFT", self, "TOPLEFT", 7, 0)
self.obj.text:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -8, 0)
self.obj.icon:Hide()
else
self:SetScript("OnClick", Frame_OnClick)
self.obj.text:SetTextColor(1, 1, 1)
self.obj.text:SetPoint("TOPLEFT", self, "TOPLEFT", 34, 0)
self.obj.icon:Show()
self.obj.useHighlight = true
if self.obj.hasIcon then
self.obj.icon:Show()
self.obj.text:ClearAllPoints()
self.obj.text:SetPoint("TOPLEFT", self, "TOPLEFT", 34, 0)
self.obj.text:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -8, 0)
else
self.obj.icon:Hide()
self.obj.text:ClearAllPoints()
self.obj.text:SetPoint("TOPLEFT", self, "TOPLEFT", 18, 0)
self.obj.text:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -8, 0)
end
end
UpdateToggle(self.obj)
end
@@ -77,14 +91,17 @@ end
local function SetText(self, text)
text = text or ""
local pos = text:find("|t", 1, true)
if pos then
ItemBase.SetText(self, text:sub(pos + 2))
local firstColon = text:find(":", 1, true)
local icon = text:sub(3, firstColon - 1)
self.icon:SetTexture(icon)
self.hasIcon = true
else
ItemBase.SetText(self, text)
self.hasIcon = false
end
self.fullText = text
end
@@ -93,7 +110,7 @@ end
local function Constructor()
local self = ItemBase.Create(widgetType)
self.text:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 34)
self.text:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 34, 0)
self.icon = self.frame:CreateTexture(nil, "OVERLAY")
self.icon:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 18, -2)
@@ -4,7 +4,7 @@ Button Widget for our Expand button
if not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local Type, Version = "WeakAurasExpandSmall", 3
local Type, Version = "WeakAurasExpandSmall", 4
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -79,6 +79,7 @@ local function OnEditFocusLost(frame)
frame:HighlightText(0, 0)
self:Fire("OnEditFocusLost")
self.scrollFrame:EnableMouseWheel(false);
local option = self.userdata.option
if option and option.callbacks and option.callbacks.OnEditFocusLost then
option.callbacks.OnEditFocusLost(self)
@@ -337,7 +338,8 @@ local function Constructor()
scrollBG:SetBackdropColor(0, 0, 0)
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate")
local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum),
frame, "UIPanelScrollFrameTemplate")
scrollFrame:EnableMouseWheel(false);
local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"]
@@ -1,7 +1,7 @@
if not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local Type, Version = "WeakAurasNewButton", 25
local Type, Version = "WeakAurasNewButton", 27
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -1,9 +1,8 @@
if not WeakAuras.IsLibsOK() then return end
--[[-----------------------------------------------------------------------------
SnippetButton Widget, based on AceGUI Button (and WA ToolbarButton)
Graphical Button.
-------------------------------------------------------------------------------]]
if not WeakAuras.IsLibsOK() then return end
local Type, Version = "WeakAurasSnippetButton", 3
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then
@@ -1,9 +1,8 @@
if not WeakAuras.IsLibsOK() then return end
--[[-----------------------------------------------------------------------------
Spacer Widget
Just uses up a bit of horizontal space
-------------------------------------------------------------------------------]]
if not WeakAuras.IsLibsOK() then return end
local Type, Version = "WeakAurasSpacer", 2
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -362,8 +362,8 @@ local function Constructor()
progressBar = progressBar,
progressBarHandle = progressBarHandle,
progressBarHandleTexture = progressBarHandleTexture,
type = Type,
frame = frame,
type = Type,
}
for method, func in pairs(methods) do
widget[method] = func
@@ -1,9 +1,8 @@
if not WeakAuras.IsLibsOK() then return end
--[[-----------------------------------------------------------------------------
ToolbarButton Widget, based on AceGUI Button
Graphical Button.
-------------------------------------------------------------------------------]]
if not WeakAuras.IsLibsOK() then return end
local Type, Version = "WeakAurasToolbarButton", 6
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -58,7 +57,7 @@ local methods = {
["SetText"] = function(self, text)
self.text:SetText(text)
if text ~= "" then
self:SetWidth(self.text:GetStringWidth() + 28)
self:SetWidth(self.text:GetStringWidth() + 24)
else
self:SetWidth(16)
end