/trunk
end |
function lib.CreateColorPicker(parent, name, desc) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-ColorPicker: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-ColorPicker: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |
local i = 0 |
function lib.CreateDropdown(parent, name, init, desc) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Button: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Button: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |
} |
function lib.CreatePanel(parent, width, height) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Panel: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Panel: Parent is not a valid frame!" ) |
local frame = CreateFrame("Frame", nil, parent) |
frame:SetFrameStrata(parent:GetFrameStrata()) |
} |
function lib.CreateSlider(parent, name, lowvalue, highvalue, valuestep, percent, desc) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Slider: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Slider: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |
if type(lowvalue) ~= "number" then lowvalue = 0 end |
end |
function lib.CreateCheckbox(parent, text, desc) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Checkbox: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Checkbox: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |
its internals may change at any time without notice. |
----------------------------------------------------------------------]] |
local MINOR_VERSION = tonumber( string.match( "$Revision: 28 $", "%d+" ) ) |
local MINOR_VERSION = tonumber( string.match( "$Revision: 29 $", "%d+" ) ) |
local lib, oldminor = LibStub:NewLibrary( "PhanxConfig-Header", MINOR_VERSION ) |
if not lib then return end |
function lib.CreateHeader( parent, titleText, notesText, noPrefix ) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Header: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "Parent is not a valid frame!" ) |
if type(titleText) ~= "string" then name = nil end |
if type(notesText) ~= "string" then desc = nil end |
end |
function lib.CreateScrollingDropdown(parent, name, items, desc) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-ScrollingDropdown: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-ScrollingDropdown: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |
end |
function lib.CreateButton( parent, name, desc ) |
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Button: Parent is not a valid frame!" ) |
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Button: Parent is not a valid frame!" ) |
if type(name) ~= "string" then name = nil end |
if type(desc) ~= "string" then desc = nil end |