|
发表于 2009-2-17 20:40:58
|
显示全部楼层
。。。。。。疯人的触发呐、、。。。、。、
创建漂浮文字在头顶
function SetTextTagTextBJ takes texttag tt, string s, real size returns nothing
local real textHeight = TextTagSize2Height(size)
call SetTextTagText(tt, s, textHeight)
endfunction
function SetTextTagPosUnitBJ takes texttag tt, unit whichUnit, real zOffset returns nothing
call SetTextTagPosUnit(tt, whichUnit, zOffset)
endfunction
function SetTextTagColorBJ takes texttag tt, real red, real green, real blue, real transparency returns nothing
call SetTextTagColor(tt, PercentTo255(red), PercentTo255(green), PercentTo255(blue), PercentTo255(100.0-transparency))
endfunction
function CreateTextTagUnitBJ takes string s, unit whichUnit, real zOffset, real size, real red, real green, real blue, real transparency returns texttag
set bj_lastCreatedTextTag = CreateTextTag()
call SetTextTagTextBJ(bj_lastCreatedTextTag, s, size)
call SetTextTagPosUnitBJ(bj_lastCreatedTextTag, whichUnit, zOffset)
call SetTextTagColorBJ(bj_lastCreatedTextTag, red, green, blue, transparency)
return bj_lastCreatedTextTag
endfunction
在BJ内部泄露不少
用SetTextTagPos这个肯定没问题 |
|