from retail

This commit is contained in:
NoM0Re
2025-01-25 17:12:25 +01:00
parent bd4cba924f
commit 6eafc394ae
17 changed files with 605 additions and 92 deletions
@@ -0,0 +1,31 @@
if not WeakAuras.IsLibsOK() then return end
local Type, Version = "WeakAurasInput", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local OnEditFocusGained = function(frame)
local self = frame.obj
local option = self.userdata.option
if option and option.callbacks and option.callbacks.OnEditFocusGained then
option.callbacks.OnEditFocusGained(self)
end
end
local OnShow = function(frame)
local self = frame.obj
local option = self.userdata.option
if option and option.callbacks and option.callbacks.OnShow then
option.callbacks.OnShow(self)
end
end
local function Constructor()
local widget = AceGUI:Create("EditBox")
widget.type = Type
widget.editbox:HookScript("OnEditFocusGained", OnEditFocusGained)
widget.editbox:HookScript("OnShow", OnShow)
return widget
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)