QB64 Phoenix Edition
Merry Marquee - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Christmas Code (https://qb64phoenix.com/forum/forumdisplay.php?fid=48)
+---- Thread: Merry Marquee (/showthread.php?tid=1303)



Merry Marquee - James D Jarvis - 12-18-2022

A simple Marquee effect to display a horizontally scrolling seasonal message.


Code: (Select All)
'merry marquee
_Title "Merry Marquee"
Screen _NewImage(800, 288, 256)
msg = _NewImage(800, 288, 256)
_Dest msg
Color 8, 0
A$ = "        Have A MERRY CHRISTMAS and a HaPpY NeW YeAr !!!             "
Print A$
_Source msg
_Dest 0
Color 15, 0
pmax = Int((_Width) / 8)
prows = Len(A$) * 8
If prows < pmax Then
    maxp = prows
Else
    maxp = (prows + 1) - pmax
End If

For pstart = 0 To maxp
    _Limit 20
    Cls
    For y = 0 To 16
        x = 1
        Color 15, 0
        If Int(Rnd * 20) < 5 Then _PrintString (Int(Rnd * _Width), Int(Rnd * _Height)), "*"
        Do
            If Point(pstart - 1 + x, y) <> 0 Then
                Color Int(1 + Rnd * 8)
                Locate y + 2, x + 1
                Print Chr$(219)
            End If
            x = x + 1
        Loop Until x = pmax - 8
    Next y
    _Display
Next pstart



RE: Merry Marquee - Pete - 12-18-2022

Code: (Select All)
HaPpY NeW YeAr !!! 


Hmm, sounds like someone is drinking early for 2023. Well, after the 2020 election "results" who can blame you.

Pete


RE: Merry Marquee - James D Jarvis - 12-18-2022

Keeping it real!


RE: Merry Marquee - Pete - 12-18-2022

Big Grin Big Grin Big Grin