function AddTitleIconWithHeadLine(string Icontex, string titleStr, optional bool bDoNotAddBlank)
{
AddTooltipItemBlank(4);
addTooltipTextureSplitLineType("L2UI_NewTex.Tooltip.TooltipLine_DetailTitleBG", 1, 25, 0, 0, 0, 0);
if( Icontex != "" )
{
addTooltipTexture(Icontex, 18, 18, 0, 0, False, False, 1, 2);
}
AddTooltipColorText(titleStr, getInstanceL2Util().Gold, False, True, False, "", 4, 4);
if( bDoNotAddBlank == False )
{
AddTooltipItemBlank(4);
}
}
function addTooltipTextureSplitLineType(string Texture, int Width, int Height, int uWidth, int uHeight, optional int OffsetX, optional int OffsetY)
{
StartItem();
m_Info.eType = DIT_SPLITLINE;
m_Info.t_bDrawOneLine = True;
m_Info.bLineBreak = False;
m_Info.u_nTextureWidth = Width;
m_Info.u_nTextureHeight = Height;
m_Info.nOffSetX = OffsetX;
m_Info.nOffSetY = OffsetY;
m_Info.u_nTextureUWidth = uWidth;
m_Info.u_nTextureUHeight = uHeight;
m_Info.u_strTexture = Texture;
EndItem();
}
function addTooltipTexture(string Texture, int Width, int Height, int uWidth, int uHeight, optional bool oneline, optional bool bLineBreak, optional int OffsetX, optional int OffsetY)
{
StartItem();
m_Info.eType = DIT_TEXTURE;
m_Info.t_bDrawOneLine = oneline;
m_Info.bLineBreak = bLineBreak;
m_Info.u_nTextureWidth = Width;
m_Info.u_nTextureHeight = Height;
m_Info.nOffSetX = OffsetX;
m_Info.nOffSetY = OffsetY;
m_Info.u_nTextureUWidth = uWidth;
m_Info.u_nTextureUHeight = uHeight;
m_Info.u_strTexture = Texture;
EndItem();
}
function AddTooltipColorText(string strDesc, Color TextColor, bool bLineBreak, bool t_bDrawOneLine, optional bool isFirstLine, optional string FontName, optional int OffsetX, optional int OffsetY)
{
local array<TextSectionInfo> TextInfos;
local string FullText;
StartItem();
GetItemTextSectionInfos(strDesc, FullText, TextInfos);
if( TextInfos.Length > 0 )
{
strDesc = FullText;
m_Info.t_SectionList = TextInfos;
}
m_Info.eType = DIT_TEXT;
if( !isFirstLine )
{
m_Info.nOffSetY = TOOLTIP_LINE_HGAP;
}
m_Info.bLineBreak = bLineBreak;
m_Info.t_bDrawOneLine = t_bDrawOneLine;
m_Info.nOffSetX = m_Info.nOffSetX + OffsetX;
m_Info.nOffSetY = m_Info.nOffSetY + OffsetY;
m_Info.t_strFontName = FontName;
m_Info.t_color = TextColor;
m_Info.t_strText = strDesc;
m_Info.nOffSetX = OffsetX;
m_Info.nOffSetY = OffsetY;
EndItem();
}
function AddTooltipItemBlank(int Height)
{
StartItem();
m_Info.eType = DIT_BLANK;
m_Info.b_nHeight = Height;
EndItem();
}