找回密码
 点一下
查看: 4779|回复: 8

文本颜色函数

[复制链接]
发表于 2007-10-12 16:49:03 | 显示全部楼层 |阅读模式
  1.     function SetTextColor takes string txt, string color returns string
  2.         //! textmacro settextcolorfunction takes color, colorcode
  3.         if ( color == "$color$" ) then
  4.             set color = "$colorcode$"
  5.         endif
  6.         //! endtextmacro
  7.         //! runtextmacro settextcolorfunction ( "White", "|cFFFFFFFF" )
  8.         //! runtextmacro settextcolorfunction ( "Red", "|c00ff0000" )
  9.         //! runtextmacro settextcolorfunction ( "Blue", "|c000000ff" )
  10.         //! runtextmacro settextcolorfunction ( "Teal", "|c0000ffff" )
  11.         //! runtextmacro settextcolorfunction ( "Purple", "|c00800080" )
  12.         //! runtextmacro settextcolorfunction ( "Yellow", "|c00ffff00" )
  13.         //! runtextmacro settextcolorfunction ( "Green", "|c0000ff00" )
  14.         //! runtextmacro settextcolorfunction ( "Pink", "|c00ff00ff" )
  15.         //! runtextmacro settextcolorfunction ( "Gray", "|cFF808080" )
  16.         //! runtextmacro settextcolorfunction ( "LightBlue", "|cFFC0FFFF" )
  17.         //! runtextmacro settextcolorfunction ( "DarkGreen", "|cFF004000" )
  18.         //! runtextmacro settextcolorfunction ( "Brown", "|cFF400000" )
  19.         //! runtextmacro settextcolorfunction ( "Black", "|cFF000000" )
  20.         return color + txt + "|r"
  21.     endfunction
复制代码

注意这是vJass的代码,WE需要支持vJass才可以用。
用法举例:

local string s = SetTextColor( "Hello", "Yellow" )
call BJDebugMsg( s )
结果:
Hello

local string s = SetTextColor( "Hello", "Blue" )
call BJDebugMsg( s )
结果:
Hello
发表于 2009-7-31 20:50:16 | 显示全部楼层
兔子先生复活了!
回复

使用道具 举报

发表于 2009-7-31 23:35:49 | 显示全部楼层
沉默啊……这可是被广告党顶上来的坟唉~~
回复

使用道具 举报

发表于 2009-7-31 23:54:11 | 显示全部楼层
沉默失策了……
2007年……
回复

使用道具 举报

发表于 2009-8-20 14:53:16 | 显示全部楼层
话说……
这么用……
有意义么……
回复

使用道具 举报

发表于 2009-11-2 08:44:05 | 显示全部楼层
沉默沉默天然呆
回复

使用道具 举报

发表于 2009-11-2 09:12:23 | 显示全部楼层
啊 怎么连我也踩坟了.这个区真危险
回复

使用道具 举报

发表于 2009-11-2 10:13:31 | 显示全部楼层
j区的两个分区都是坟区……
回复

使用道具 举报

发表于 2009-11-2 12:02:13 | 显示全部楼层
呜 居然被沉默沉默引诱到坟墓里踩坟了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-22 14:36 , Processed in 0.042054 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表