API:ATF OnLoad

== Function ==
function ATF_OnLoad(this)
	local x,y;
	x = 8 + 85;
	y = 8;
	for i=1 , DF_TypeItemMax ,1 do
		local obj = getglobal( "ATF_TypeItem" .. i );
		obj:ClearAllAnchors();
		obj:SetAnchor( "TOP", "TOPLEFT", "$parent", x, 20*(i-1) + y );
	end
	x = 8 ;
	y = 8 ;
	local obj = getglobal( "ATF_TitleItem" .. 1 );
	obj:ClearAllAnchors();
	obj:SetAnchor( "TOPLEFT", "TOPLEFT", "$parent", x, y );
	for i=2 , DF_TitleItemMax ,1 do
		local obj1 = getglobal( "ATF_TitleItem" .. i - 1 );
		local obj2 = getglobal( "ATF_TitleItem" .. i );
		obj2:ClearAllAnchors();
		obj2:SetAnchor( "TOP", "BOTTOM", obj1, 0, 0 );
	end
	ATF_TypeListScrollBar:SetValueStepMode("INT");
	ATF_TitleListScrollBar:SetValueStepMode("INT");
	this:RegisterEvent("PLAYER_TITLE_ID_CHANGED");
	this:RegisterEvent("PLAYER_TITLE_FLAG_CHANGED");
end
Category:Functions