WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/PhanxConfig-Header
    from Rev 48 to Rev 50
    Reverse comparison

Rev 48 → Rev 50

PhanxConfig-Header.lua New file
0,0 → 1,40
--[[--------------------------------------------------------------------
PhanxConfig-Header
Simple options panel header generator.
Requires LibStub.
 
This library is not intended for use by other authors. Absolutely no
support of any kind will be provided for other authors using it, and
its internals may change at any time without notice.
----------------------------------------------------------------------]]
 
local MINOR_VERSION = tonumber( string.match( "$Revision: 28 $", "%d+" ) )
 
local lib, oldminor = LibStub:NewLibrary( "PhanxConfig-Header", MINOR_VERSION )
if not lib then return end
 
function lib.CreateHeader( parent, titleText, notesText, noPrefix )
if not titleText then
titleText = parent.name
end
if titleText and not noPrefix and parent.parent then
titleText = string.format( "%s - %s", parent.parent, titleText )
end
 
local title = parent:CreateFontString( nil, "ARTWORK", "GameFontNormalLarge" )
title:SetPoint( "TOPLEFT", 16, -16 )
title:SetPoint( "TOPRIGHT", -16, -16 )
title:SetJustifyH( "LEFT" )
title:SetText( titleText )
 
local notes = parent:CreateFontString( nil, "ARTWORK", "GameFontHighlightSmall" )
notes:SetPoint( "TOPLEFT", title, "BOTTOMLEFT", 0, -8 )
notes:SetPoint( "TOPRIGHT", title, 0, -8 )
notes:SetHeight( 32 )
notes:SetJustifyH( "LEFT" )
notes:SetJustifyV( "TOP" )
notes:SetNonSpaceWrap( true )
notes:SetText( notesText )
 
return title, notes
end
\ No newline at end of file Property changes : Added: svn:eol-style + native