fix: v1.4.4 - AceGUI pool fixes, event handling nil checks, QuestieLearner serialization, l10n format fixes
This commit is contained in:
@@ -138,6 +138,8 @@ end
|
||||
function AceGUI:Create(widgetType)
|
||||
if WidgetRegistry[widgetType] then
|
||||
local widget = newWidget(widgetType)
|
||||
|
||||
if not widget then return end
|
||||
|
||||
if rawget(widget, "Acquire") then
|
||||
widget.OnAcquire = widget.Acquire
|
||||
@@ -170,6 +172,7 @@ end
|
||||
-- If this widget is a Container-Widget, all of its Child-Widgets will be releases as well.
|
||||
-- @param widget The widget to release
|
||||
function AceGUI:Release(widget)
|
||||
if not widget then return end
|
||||
if widget.isQueuedForRelease then return end
|
||||
widget.isQueuedForRelease = true
|
||||
safecall(widget.PauseLayout, widget)
|
||||
@@ -296,6 +299,7 @@ do
|
||||
end
|
||||
|
||||
WidgetBase.Fire = function(self, name, ...)
|
||||
if not self or not self.type or not self.events then return end
|
||||
if self.events[name] then
|
||||
local success, ret = safecall(self.events[name], self, name, ...)
|
||||
if success then
|
||||
@@ -412,14 +416,19 @@ do
|
||||
local WidgetContainerBase = AceGUI.WidgetContainerBase
|
||||
|
||||
WidgetContainerBase.PauseLayout = function(self)
|
||||
self.LayoutPaused = true
|
||||
if self then
|
||||
self.LayoutPaused = true
|
||||
end
|
||||
end
|
||||
|
||||
WidgetContainerBase.ResumeLayout = function(self)
|
||||
self.LayoutPaused = nil
|
||||
if self then
|
||||
self.LayoutPaused = nil
|
||||
end
|
||||
end
|
||||
|
||||
WidgetContainerBase.PerformLayout = function(self)
|
||||
if not self then return end
|
||||
if self.LayoutPaused then
|
||||
return
|
||||
end
|
||||
@@ -428,7 +437,9 @@ do
|
||||
|
||||
--call this function to layout, makes sure layed out objects get a frame to get sizes etc
|
||||
WidgetContainerBase.DoLayout = function(self)
|
||||
self:PerformLayout()
|
||||
if self then
|
||||
self:PerformLayout()
|
||||
end
|
||||
-- if not self.parent then
|
||||
-- self.frame:SetScript("OnUpdate", LayoutOnUpdate)
|
||||
-- end
|
||||
@@ -471,7 +482,9 @@ do
|
||||
end
|
||||
|
||||
WidgetContainerBase.SetLayout = function(self, Layout)
|
||||
self.LayoutFunc = AceGUI:GetLayout(Layout)
|
||||
if self then
|
||||
self.LayoutFunc = AceGUI:GetLayout(Layout)
|
||||
end
|
||||
end
|
||||
|
||||
WidgetContainerBase.SetAutoAdjustHeight = function(self, adjust)
|
||||
@@ -617,6 +630,7 @@ end
|
||||
-- Very simple Layout, Children are stacked on top of each other down the left side
|
||||
AceGUI:RegisterLayout("List",
|
||||
function(content, children)
|
||||
if not content then return end
|
||||
local height = 0
|
||||
local width = content.width or content:GetWidth() or 0
|
||||
for i = 1, #children do
|
||||
@@ -654,6 +668,7 @@ AceGUI:RegisterLayout("List",
|
||||
-- A single control fills the whole content area
|
||||
AceGUI:RegisterLayout("Fill",
|
||||
function(content, children)
|
||||
if not content then return end
|
||||
if children[1] then
|
||||
children[1]:SetWidth(content:GetWidth() or 0)
|
||||
children[1]:SetHeight(content:GetHeight() or 0)
|
||||
@@ -674,6 +689,7 @@ end
|
||||
AceGUI:RegisterLayout("Flow",
|
||||
function(content, children)
|
||||
if layoutrecursionblock then return end
|
||||
if not content then return end
|
||||
--used height so far
|
||||
local height = 0
|
||||
--width used in the current row
|
||||
@@ -852,6 +868,7 @@ Cell:
|
||||
]]
|
||||
AceGUI:RegisterLayout("Table",
|
||||
function (content, children)
|
||||
if not content then return end
|
||||
local obj = content.obj
|
||||
obj:PauseLayout()
|
||||
|
||||
|
||||
@@ -187,7 +187,12 @@ local function Constructor()
|
||||
|
||||
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetColorTexture(0, 0, 0, 0.4)
|
||||
if scrollbg.SetColorTexture then
|
||||
scrollbg:SetColorTexture(0, 0, 0, 0.4)
|
||||
else
|
||||
scrollbg:SetTexture(0, 0, 0)
|
||||
scrollbg:SetVertexColor(0, 0, 0, 0.4)
|
||||
end
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame", nil, scrollframe)
|
||||
|
||||
@@ -679,7 +679,12 @@ local function Constructor()
|
||||
|
||||
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetColorTexture(0,0,0,0.4)
|
||||
if scrollbg.SetColorTexture then
|
||||
scrollbg:SetColorTexture(0,0,0,0.4)
|
||||
else
|
||||
scrollbg:SetTexture(0, 0, 0)
|
||||
scrollbg:SetVertexColor(0, 0, 0, 0.4)
|
||||
end
|
||||
|
||||
local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
|
||||
|
||||
@@ -143,7 +143,12 @@ local function Constructor()
|
||||
colorSwatch.background = texture
|
||||
texture:SetWidth(16)
|
||||
texture:SetHeight(16)
|
||||
texture:SetColorTexture(1, 1, 1)
|
||||
if texture.SetColorTexture then
|
||||
texture:SetColorTexture(1, 1, 1)
|
||||
else
|
||||
texture:SetTexture(1, 1, 1)
|
||||
texture:SetVertexColor(1, 1, 1, 1)
|
||||
end
|
||||
texture:SetPoint("CENTER", colorSwatch)
|
||||
texture:Show()
|
||||
|
||||
|
||||
@@ -455,7 +455,12 @@ do
|
||||
|
||||
local line = self.frame:CreateTexture(nil, "OVERLAY")
|
||||
line:SetHeight(1)
|
||||
line:SetColorTexture(.5, .5, .5)
|
||||
if line.SetColorTexture then
|
||||
line:SetColorTexture(0.5, 0.5, 0.5)
|
||||
else
|
||||
line:SetTexture(0.5, 0.5, 0.5)
|
||||
line:SetVertexColor(0.5, 0.5, 0.5, 1)
|
||||
end
|
||||
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
|
||||
line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user