LuaQuick框架(客户端)

996传奇引擎三端lua快速开发


富文本 (RichText )

<p>[TOC]</p> <h3>创建富文本</h3> <pre><code>co.RichText:create(parent,t)</code></pre> <pre><code>t.id or &amp;quot;rich_text&amp;quot; t.content or &amp;quot;&amp;quot; t.width or 200 t.font or 18 t.color or &amp;quot;#ffffff&amp;quot; t.callback or callback t.fontName t.margin or 5 t.lineSize or 1 t.x or 0 t.y or 0 t.ontline or {outlineSize = 1,outlineColor = {r = 255,g = 255,b = 255}} t.closeOutline --关闭描边</code></pre> <h3>创建新富文本</h3> <pre><code>co.RichText:createTxt(parent,p)</code></pre> <pre><code>parent,        --父节点 p.id,         --唯一ID p.x  or 0,      --位置 横坐标 p.y  or 0,      --位置 纵坐标 p.content,     --文本内容 p.width or 888,       --富文本控件宽度 p.font or 18,        --字体大小 p.color or &amp;#039;#FFFFFF&amp;#039;,       --字体颜色 p.margin,      --富文本行间距 p.callback,    --超链回调函数 p.fontName,    --字体文件路径 p.outlineParam or {outlineSize=2,outlineColor=SL:ConvertColorFromHexString(&amp;#039;#000000&amp;#039;)} --描边参数outlineSize: 描边大小outlineColor: 描边颜色 C3B (描边颜色 例 : SL:ConvertColorFromHexString(&amp;quot;#FFFFFF&amp;quot;))</code></pre> <h3>设置富文本背景颜色</h3> <pre><code>co.RichText:setBackGroundColor(widget,color)</code></pre> <p>``` 格式化富文本 widget 富文本对象 color  颜色值(#000000)</p> <pre><code>### 格式化富文本</code></pre> <p>co.RichText:formatText(widget)</p> <pre><code>### 格式化富文本中href内容</code></pre> <p>co.RichText:formatHref(content)</p> <pre><code></code></pre> <p>richText 富文本内容</p> <pre><code></code></pre>

页面列表

ITEM_HTML