hi,
I would like to create a moving marquee inside a window (like we have in html).
Any tips on this?
Thanks!
how to move text continuously inside a window
how to move text continuously inside a window
Last edited by yabune on Mon Sep 15, 2008 5:17 pm, edited 1 time in total.
ok, I have a solution:
But I can't make it move smoothly...
Anyone knows how to make the animation more smooth?
Thanks
Code: Select all
x = 0
y = 0
If OpenWindow(0, 100, 200, 300, 260, "Marquee")
CreateImage(0, 300, 20)
CreateGadgetList(WindowID(0))
ImageGadget(0, 0, 100, 0, 0, ImageID(0))
last = ElapsedMilliseconds()
Repeat
EventID = WindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
Else
Delay(1)
EndIf
current = ElapsedMilliseconds()
If(current - last >= 20)
x = x + 1
CreateImage(0, 300, 20)
StartDrawing(ImageOutput(0))
DrawingMode(1)
BackColor(RGB(0,155,155))
FrontColor(RGB(255,255,255))
DrawText(x,y,"Hello, this is a test")
StopDrawing()
SetGadgetState(0, ImageID(0))
last = ElapsedMilliseconds()
EndIf
Until Quit = 1
EndIf
End
Anyone knows how to make the animation more smooth?
Thanks
the search function is your friend (of course it helps that I remember coding something along these lines
)
http://www.purebasic.fr/english/viewtopic.php?t=22826

http://www.purebasic.fr/english/viewtopic.php?t=22826
there is no sig, only zuul (and the following disclaimer)
WARNING: may be talking out of his hat
WARNING: may be talking out of his hat