API:ATF AddTitleInfo

Function
function ATF_AddTitleInfo( info )

if( info.classify1 and info.classify2 >= 0 )then

if( not g_TitleTable[info.classify1] )then g_TitleTable[info.classify1] = {}; g_TitleTable[info.classify1].classifys = {}; g_TitleTable[info.classify1].type = "classify1"; g_TitleTable[info.classify1].token = info.classify1; g_TitleTable[info.classify1].name = TEXT( "UI_TITLE_TYPE_" .. info.classify1 ); g_TitleTable[info.classify1].sort = info.sort1 - 0.5;

end

if( not g_TitleTable[info.classify1].classifys[info.classify2] )then g_TitleTable[info.classify1].classifys[info.classify2] = {}; g_TitleTable[info.classify1].classifys[info.classify2].titles = {}; g_TitleTable[info.classify1].classifys[info.classify2].type = "classify2"; g_TitleTable[info.classify1].classifys[info.classify2].token = info.classify1 .. "_" .. info.classify2; g_TitleTable[info.classify1].classifys[info.classify2].name = TEXT( "UI_TITLE_TYPE_" .. info.classify1 .. "_" .. info.classify2 );

g_TitleTable[info.classify1].classifys[info.classify2].sort = info.sort1 + info.sort2 / 10000;

end

table.insert( g_TitleTable[info.classify1].classifys[info.classify2].titles, info );

end

end