AR_Engine_SDK
|
#include <XUILabel.h>
函数 | |
function XUILabel | CreateWithTTF () end |
function XUILabel | CreateWithTTF (ttfConfig, strUtf8Text, nLineWidth, hAlignment, vAlignment) end |
function XUILabel | CreateWithTTF (strUtf8Text, strFontFilePath, fontPointSize, nLineWidth, hAlignment, vAlignment) end |
function XUILabel | CreateWithSystemFont () end |
function XUILabel | CreateWithSystemFont (strUtf8Text, fontName, fontPointSize, hAlignment, vAlignment) end |
function XUILabel | CreateWhithImageFont (ttfConfig) end |
function XUILabel | new (hAlignment, vAlignment) end |
function XUILabel | UpdateImmediately () end |
function XUILabel | SetTextPointSize (fPointSize) end |
function XUILabel | GetTextPointSize () end |
function XUILabel | SetEnableWrap (bEnableWrap) end |
function XUILabel | GetEnableWrap () end |
function XUILabel | SetString (strUtf8Text) end |
function XUILabel | GetString () end |
function XUILabel | GetStringCount () end |
function XUILabel | SetAlignment (hAlign, vAlign) end |
function XUILabel | SetHAlignMent (hAlign) end |
function XUILabel | SetVAlignMent (vAlign) end |
function XUILabel | GetHAlignment () end |
function XUILabel | GetVAlignment () end |
function XUILabel | SetDimensions (fWidth, fHeight) end |
function XUILabel | GetDimensions () end |
function XUILabel | SetTextColor (clr) end |
function XUILabel | GetTextColor () end |
function XUILabel | SetTextUpperColor (clr) end |
function XUILabel | GetTextUpperColor () end |
function XUILabel | SetTextLowerColor (clr) end |
function XUILabel | GetTextLowerColor () end |
function XUILabel | SetOutlineColor (clrOutLine) end |
function XUILabel | GetOutlineColor () end |
function XUILabel | SetOutlineSize (nOutlineSize) end |
function XUILabel | GetOutlineSize () end |
function XUILabel | SetAdditionalKerning (fAdditionalKerning) end |
function XUILabel | GetAdditionalKerning () end |
function XUILabel | SetLineSpacing (fLineSpacing) end |
function XUILabel | GetLineSpacing () end |
function XUILabel | SetTTFFontPath (strPath) end |
function XUILabel | GetTTFFontPath () end |
function XUILabel | SetFontPath (strPath) end |
function XUILabel | GetFontPath () end |
function XUILabel | SetPListPath (strPath) end |
function XUILabel | GetImgFontPath () end |
function XUILabel | SetBreakOfWesternWord (bBreakOfWesternWord) end |
function XUILabel | GetBreakOfWesternWord () end |
function XUILabel | ChangeToSystemFont () end |
function XUILabel | SetSystemFontName (strFontName) end |
function XUILabel | GetSystemFontName () end |
function XUILabel | GetLabelType () end |
function XUILabel | SetLabelType (type) end |
function XUILabel | SetRichText (tichtext) end |
function XUILabel | SetTextFormat (_format) end |
function XUILabel | GetFontTextures () end |
变量 | |
XUILabel = {} | |
XUILabel | XUIL_TTF = 0 |
XUILabel | XUIL_SYSTEMF = 0 |
XUILabel | XUIL_IMAGE = 0 |
function XUILabel ChangeToSystemFont | ( | ) |
切换到系统字体
function XUILabel CreateWhithImageFont | ( | ttfConfig | ) |
function XUILabel CreateWithSystemFont | ( | strUtf8Text | , |
fontName | , | ||
fontPointSize | , | ||
hAlignment | , | ||
vAlignment | |||
) |
基于平台相关的API创建和初始化一个文本
strUtf8Text | string 最初文本内容 |
fontName | string 一个字体文件或字体名称 |
fontPointSize | number 字体大小,这个值必须大于0 |
hAlignment | number 水平对齐方式 |
vAlignment | number 水平对齐方式 |
function XUILabel CreateWithTTF | ( | strUtf8Text | , |
strFontFilePath | , | ||
fontPointSize | , | ||
nLineWidth | , | ||
hAlignment | , | ||
vAlignment | |||
) |
使用FreeType2库创建和初始化一个文本
strUtf8Text | string 最初文本内容 |
strFontFilePath | string 一个TTF字体文件 |
fontPointSize | number 字体大小,这个值必须大于0 |
nLineWidth | number 线宽 |
hAlignment | number 水平对齐方式 |
vAlignment | number 水平对齐方式 |
function XUILabel CreateWithTTF | ( | ttfConfig | , |
strUtf8Text | , | ||
nLineWidth | , | ||
hAlignment | , | ||
vAlignment | |||
) |
使用FreeType2库创建和初始化一个文本
ttfConfig | XUITTFConfig ttf信息 |
strUtf8Text | string 最初文本内容 |
nLineWidth | number 线宽 |
hAlignment | number 水平对齐方式 |
vAlignment | number 水平对齐方式 |
function XUILabel GetAdditionalKerning | ( | ) |
XUILabel_GetAdditionalKerning00
function XUILabel GetBreakOfWesternWord | ( | ) |
XUILabel_GetBreakOfWesternWord00
function XUILabel GetEnableWrap | ( | ) |
XUILabel_GetEnableWrap00
function XUILabel GetFontPath | ( | ) |
XUILabel_GetFontPath00
function XUILabel GetFontTextures | ( | ) |
XUILabel_GetFontTextures00
function XUILabel GetHAlignment | ( | ) |
XUILabel_GetHAlignment00
function XUILabel GetImgFontPath | ( | ) |
XUILabel_GetImgFontPath00
function XUILabel GetLabelType | ( | ) |
XUILabel_GetLabelType00
function XUILabel GetLineSpacing | ( | ) |
XUILabel_GetLineSpacing00
function XUILabel GetOutlineColor | ( | ) |
XUILabel_GetOutlineColor00
function XUILabel GetOutlineSize | ( | ) |
XUILabel_GetOutlineSize00
function XUILabel GetString | ( | ) |
获取文本内容
function XUILabel GetStringCount | ( | ) |
获取文本大小
function XUILabel GetSystemFontName | ( | ) |
XUILabel_GetSystemFontName00
function XUILabel GetTextColor | ( | ) |
XUILabel_GetTextColor00
function XUILabel GetTextLowerColor | ( | ) |
XUILabel_GetTextLowerColor00
function XUILabel GetTextPointSize | ( | ) |
XUILabel_GetTextPointSize00
function XUILabel GetTextUpperColor | ( | ) |
XUILabel_GetTextUpperColor00
function XUILabel GetTTFFontPath | ( | ) |
XUILabel_GetTTFFontPath00
function XUILabel GetVAlignment | ( | ) |
XUILabel_GetVAlignment00
function XUILabel new | ( | hAlignment | , |
vAlignment | |||
) |
function XUILabel SetAdditionalKerning | ( | fAdditionalKerning | ) |
获取文本描边宽度 设置文本的字间距, 仅TTF文字支持
fAdditionalKerning | number 字间距值 |
function XUILabel SetAlignment | ( | hAlign | , |
vAlign | |||
) |
设置文本对齐方式
hAlign | number 水平对齐 |
vAlign | number 竖直对齐 |
function XUILabel SetBreakOfWesternWord | ( | bBreakOfWesternWord | ) |
设置是否允许在西文单词中换行, 仅TTF文字支持
bBreakOfWesternWord | boolean 是否在西文中换行 |
设置文本区域 即Label的宽度和高度,按文字行最大宽度和高度自动调整
fWidth | number |
fHeight | number 高度当fHeight>0.0,且文字总高度超出fHeight,则截断文字。fWidth或fHeight为小于等于0.0,则表示大小自动适应。 |
function XUILabel SetEnableWrap | ( | bEnableWrap | ) |
设置是否自动换行
bEnableWrap | boolean 默认true,为false时,要求m_fLabelWidth>0.0f,才会进行自动换行处理。 |
function XUILabel SetFontPath | ( | strPath | ) |
XUILabel_SetFontPath00
strPath | string |
function XUILabel SetHAlignMent | ( | hAlign | ) |
设置文本水平对齐方式
hAlign | number 水平对齐 |
function XUILabel SetLineSpacing | ( | fLineSpacing | ) |
设置文本的行间距, 仅TTF文字支持
fLineSpacing | number |
function XUILabel SetOutlineColor | ( | clrOutLine | ) |
function XUILabel SetOutlineSize | ( | nOutlineSize | ) |
设置文本描边宽度
nOutlineSize | number |
function XUILabel SetPListPath | ( | strPath | ) |
XUILabel_SetPListPath00
strPath | string |
function XUILabel SetRichText | ( | tichtext | ) |
XUILabel_SetRichText00
tichtext | string |
function XUILabel SetString | ( | strUtf8Text | ) |
@manual 设置文本内容 手动导出 增加扩展,支持传入任何类型 XUILabel_SetString_manual
strUtf8Text | string |
function XUILabel SetSystemFontName | ( | strFontName | ) |
设置系统字体名称
strFontName | string 系统字体名称 |
function XUILabel SetTextColor | ( | clr | ) |
function XUILabel SetTextFormat | ( | _format | ) |
function XUILabel SetTextLowerColor | ( | clr | ) |
function XUILabel SetTextPointSize | ( | fPointSize | ) |
设置字体大小
fPointSize | number |
function XUILabel SetTextUpperColor | ( | clr | ) |
function XUILabel SetTTFFontPath | ( | strPath | ) |
更改字体
strPath | string |
function XUILabel SetVAlignMent | ( | vAlign | ) |
设置文本垂直对齐方式
vAlign | number 垂直对齐 |
function XUILabel UpdateImmediately | ( | ) |
应用设置
XUILabel XUIL_IMAGE = 0 |
XUILabel XUIL_SYSTEMF = 0 |
XUILabel XUIL_TTF = 0 |
XUILabel = {} |