ui-widgets: add function to create textboxes

This commit is contained in:
shagu
2020-01-03 01:03:12 +01:00
parent 6de221188a
commit 4c59fab99c
+12
View File
@@ -193,6 +193,18 @@ function pfUI.api.CreateScrollChild(name, parent)
return f
end
-- [ CreateTextBox ]
-- Creates and returns a default pfUI skinned EditBox
function pfUI.api.CreateTextBox(name, parent)
local f = CreateFrame("EditBox", name, parent)
f:SetScript("OnEscapePressed", function() this:ClearFocus() end)
f:SetAutoFocus(false)
f:SetTextInsets(5, 5, 5, 5)
f:SetFontObject(GameFontNormal)
CreateBackdrop(f, nil, true)
return f
end
-- [ EnableClickRotate ]
-- Enables Modelframes to be rotated by click-drag
-- 'frame' [frame] the modelframe that should be used