Сделал, с вас 5 тыщь рублей
Code
if(coloredTagsPos[k] == 1) then
call SetTextTagColor(coloredTags[k], 0, 255, 0, 100) //с красного на зеленый
elseif(coloredTagsPos[k] == 2) then
call SetTextTagColor(coloredTags[k], 0, 0, 255, 100) //с зеленого на синий
else
call SetTextTagColor(coloredTags[k], 255, 0, 0, 100) //с синего на красный
endif
if not(coloredTagsPos[k] == 3) then
set coloredTagsPos[k] = coloredTagsPos[k] + 1
else
set coloredTagsPos[k] = 1
endif
Ну, и собственно, пример:
Добавлено (01-08-2011, 15:45)
---------------------------------------------
итить калатить глюки
вот весь код:
Code
globals
timer array coloredTagsTms
texttag array coloredTags
integer array coloredTagsPos
integer coloredTagsNum=0
endglobals
function ColorTextTag takes nothing returns nothing
local integer i=0
local integer k=0
loop
if (coloredTagsTms[i] == GetExpiredTimer()) then
set k = i
endif
set i = i+1
exitwhen (i == coloredTagsNum)
endloop
if(coloredTagsPos[k] == 1) then
call SetTextTagColor(coloredTags[k], 0, 255, 0, 100) //с красного на зеленый
elseif(coloredTagsPos[k] == 2) then
call SetTextTagColor(coloredTags[k], 0, 0, 255, 100) //с зеленого на синий
else
call SetTextTagColor(coloredTags[k], 255, 0, 0, 100) //с синего на красный
endif
if not(coloredTagsPos[k] == 3) then
set coloredTagsPos[k] = coloredTagsPos[k] + 1
else
set coloredTagsPos[k] = 1
endif
endfunction
function CreateColoredTextTag takes string text, real x, real y returns nothing
set coloredTagsTms[coloredTagsNum] = CreateTimer()
set coloredTags[coloredTagsNum] = CreateTextTag()
set coloredTagsPos[coloredTagsNum] = 1
local real textHeight = TextTagSize2Height(8.00) //не раскрывал, будет время - раскрой.
call SetTextTagText(coloredTags[coloredTagsNum], text, textHeight)
call SetTextTagPos(coloredTags[coloredTagsNum], x, y, 0)
call SetTextTagColor(coloredTags[coloredTagsNum], 255, 0, 0, 100)
call TimerStart(coloredTagsTms[coloredTagsNum],0.10,true,function ColorTextTag)
set coloredTagsNum = coloredTagsNum+1
endfunction