chore(libs): sync Ace3 to coa-ace3 (WoWUIDev master @ 52e5f2c)

Bring every embedded Ace3 / CallbackHandler / LibStub copy in line with the
canonical Exiles/coa-ace3 bundle so LibStub resolution is predictable across
all Exiles forks regardless of which addons are enabled.

Per-library MINOR moves:
  AceAddon-3.0          5 → 13
  AceEvent-3.0          3 → 4
  AceTimer-3.0          5 → 17  (C_Timer-based; available on the CoA client)
  AceHook-3.0           5 → 9
  AceDB-3.0            21 → 33
  AceDBOptions-3.0     12 → 15
  AceConfig-3.0         2 → 3
  AceConfigRegistry-3.0 12 → 22
  AceConfigCmd-3.0     12 → 14
  AceConfigDialog-3.0  49 → 92
  AceGUI-3.0           33 → 41
  AceLocale-3.0         2 → 6
  AceBucket-3.0         3 → 4
  CallbackHandler-1.0   5 → 8
  AceConsole-3.0, LibStub: unchanged (already at target)
This commit is contained in:
2026-05-23 06:31:15 +02:00
parent a5315d3131
commit 1cbeca4b50
42 changed files with 2812 additions and 2215 deletions
@@ -1,7 +1,7 @@
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 21
local Type, Version = "EditBox", 29
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -10,20 +10,20 @@ local tostring, pairs = tostring, pairs
-- WoW APIs
local PlaySound = PlaySound
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName
local GetCursorInfo, ClearCursor = GetCursorInfo, ClearCursor
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
if not AceGUIEditBoxInsertLink then
-- upgradeable hook
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
if ChatFrameUtil and ChatFrameUtil.InsertLink then
hooksecurefunc(ChatFrameUtil, "InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
elseif ChatEdit_InsertLink then
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
end
end
function _G.AceGUIEditBoxInsertLink(text)
@@ -59,6 +59,11 @@ local function Control_OnLeave(frame)
frame.obj:Fire("OnLeave")
end
local function Frame_OnShowFocus(frame)
frame.obj.editbox:SetFocus()
frame:SetScript("OnShow", nil)
end
local function EditBox_OnEscapePressed(frame)
AceGUI:ClearFocus()
end
@@ -68,29 +73,33 @@ local function EditBox_OnEnterPressed(frame)
local value = frame:GetText()
local cancel = self:Fire("OnEnterPressed", value)
if not cancel then
PlaySound("igMainMenuOptionCheckBoxOn")
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
HideButton(self)
end
end
local function EditBox_OnReceiveDrag(frame)
local self = frame.obj
local type, id, info = GetCursorInfo()
local type, id, info, extra = GetCursorInfo()
local name
if type == "item" then
self:SetText(info)
self:Fire("OnEnterPressed", info)
ClearCursor()
name = info
elseif type == "spell" then
local name, rank = GetSpellName(id, info)
if rank and rank:match("%d") then
name = name.."("..rank..")"
if C_Spell and C_Spell.GetSpellName then
name = C_Spell.GetSpellName(extra)
else
name = GetSpellInfo(id, info)
end
elseif type == "macro" then
name = GetMacroInfo(id)
end
if name then
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
HideButton(self)
AceGUI:ClearFocus()
end
HideButton(self)
AceGUI:ClearFocus()
end
local function EditBox_OnTextChanged(frame)
@@ -103,6 +112,10 @@ local function EditBox_OnTextChanged(frame)
end
end
local function EditBox_OnFocusGained(frame)
AceGUI:SetFocus(frame.obj)
end
local function Button_OnClick(frame)
local editbox = frame.obj.editbox
editbox:ClearFocus()
@@ -123,7 +136,9 @@ local methods = {
self:SetMaxLetters(0)
end,
-- ["OnRelease"] = nil,
["OnRelease"] = function(self)
self:ClearFocus()
end,
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
@@ -146,6 +161,10 @@ local methods = {
HideButton(self)
end,
["GetText"] = function(self, text)
return self.editbox:GetText()
end,
["SetLabel"] = function(self, text)
if text and text ~= "" then
self.label:SetText(text)
@@ -164,10 +183,29 @@ local methods = {
["DisableButton"] = function(self, disabled)
self.disablebutton = disabled
if disabled then
HideButton(self)
end
end,
["SetMaxLetters"] = function (self, num)
self.editbox:SetMaxLetters(num or 0)
end,
["ClearFocus"] = function(self)
self.editbox:ClearFocus()
self.frame:SetScript("OnShow", nil)
end,
["SetFocus"] = function(self)
self.editbox:SetFocus()
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", Frame_OnShowFocus)
end
end,
["HighlightText"] = function(self, from, to)
self.editbox:HighlightText(from, to)
end
}
@@ -189,6 +227,7 @@ local function Constructor()
editbox:SetScript("OnTextChanged", EditBox_OnTextChanged)
editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
editbox:SetScript("OnEditFocusGained", EditBox_OnFocusGained)
editbox:SetTextInsets(0, 0, 3, 3)
editbox:SetMaxLetters(256)
editbox:SetPoint("BOTTOMLEFT", 6, 0)