Port XML templates to Lua, update AceGUI/AceConfig, fix $parent nil frame issues on our game version
This commit is contained in:
@@ -54,7 +54,8 @@ local methods = {
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", Type .. widgetNum, UIParent)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
--Container Support
|
||||
|
||||
@@ -644,7 +644,7 @@ local function Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
|
||||
local treeframe = CreateFrame("Frame", nil, frame)
|
||||
local treeframe = CreateFrame("Frame", ("AceConfigDialogTreeFrame%d"):format(num), frame)
|
||||
treeframe:SetPoint("TOPLEFT")
|
||||
treeframe:SetPoint("BOTTOMLEFT")
|
||||
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
||||
|
||||
@@ -1828,7 +1828,8 @@ local function Constructor()
|
||||
|
||||
view.visibility = 0;
|
||||
|
||||
local renamebox = CreateFrame("EditBox", nil, button, "WA_InputBoxTemplate");
|
||||
local renamebox = CreateFrame("EditBox", nil, button);
|
||||
WeakAuras.XMLTemplates["InputBoxTemplate"](renamebox)
|
||||
renamebox:SetHeight(14);
|
||||
renamebox:SetPoint("TOP", button, "TOP");
|
||||
renamebox:SetPoint("LEFT", icon, "RIGHT", 6, 0);
|
||||
|
||||
@@ -309,11 +309,11 @@ local backdrop = {
|
||||
}
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", ("%s%Frame"):format(Type, widgetNum), UIParent)
|
||||
frame:Hide()
|
||||
|
||||
frame:SetScript("OnShow", OnFrameShow);
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
|
||||
|
||||
@@ -284,10 +284,9 @@ local backdrop = {
|
||||
}
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", ("%s%Frame"):format(Type, widgetNum), UIParent)
|
||||
frame:Hide()
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
|
||||
|
||||
@@ -194,7 +194,8 @@ local function Constructor()
|
||||
deleteButton:SetPushedTexture(delPushed)
|
||||
button.deleteHighlight = delHighlight
|
||||
|
||||
local renameEditBox = CreateFrame("EditBox", nil, button, "WA_InputBoxTemplate")
|
||||
local renameEditBox = CreateFrame("EditBox", nil, button)
|
||||
WeakAuras.XMLTemplates["InputBoxTemplate"](renameEditBox)
|
||||
renameEditBox:SetHeight(14)
|
||||
renameEditBox:SetPoint("TOPLEFT", title, "TOPLEFT")
|
||||
renameEditBox:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT")
|
||||
|
||||
@@ -306,7 +306,8 @@ local function Constructor()
|
||||
rightbutton:SetDisabledTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxrightp")
|
||||
rightbutton:SetScript("OnClick", SpinBox_OnValueUp)
|
||||
|
||||
local editbox = CreateFrame("EditBox", nil, frame, "WA_InputBoxTemplate")
|
||||
local editbox = CreateFrame("EditBox", nil, frame)
|
||||
WeakAuras.XMLTemplates["InputBoxTemplate"](editbox)
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:SetFontObject(ChatFontNormal)
|
||||
editbox:SetHeight(19)
|
||||
|
||||
Reference in New Issue
Block a user