Is there anyway to fade text in and out in an editor gadget? I tried changing the text color in a loop with a delay between changes but that did not work.
Thank you Mr.L,
I had not set the text after each color change. It does work but is a bit choppy. I will continue to modify the delay time and the step size to see if I can get reasonable results.
[solved] text fading
[solved] text fading
Last edited by k3pto on Mon Aug 26, 2024 1:46 am, edited 1 time in total.
Re: text fading
have you tried it like that?
Code: Select all
OpenWindow(0,0,0,800,200,"!")
EditorGadget(0,0,0,800,200)
LoadFont(0, "Arial", 64)
SetGadgetFont(0,FontID(0))
Repeat
t = ElapsedMilliseconds()
c = 128 + Sin(t * 0.001) * 127
SetGadgetColor(0, #PB_Gadget_FrontColor, RGB(c,c,c))
SetGadgetText(0, " Fading Text Demo")
While WindowEvent()
If Event()=#PB_Event_CloseWindow:End:EndIf
Wend
Delay(15)
ForEver