Liberty BASIC Community Forum
« Windows 8/10 loading/buffering/waiting display »

Welcome Guest. Please Login or Register.
Feb 18th, 2018, 3:45pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Windows 8/10 loading/buffering/waiting display  (Read 82 times)
JohnnyD
Guru
ImageImageImageImageImage


member is offline

Avatar

"If something should, then it doesn't, isn't, can't, hasn't or won't"


Homepage PM

Gender: Male
Posts: 766
xx Windows 8/10 loading/buffering/waiting display
« Thread started on: Jan 19th, 2018, 05:50am »

Hi,

This is an attempt at replicating the Windows 8/10 loading/waiting/buffering/updating spinning balls animation.

Copied some of the code from the example CLOCK2 that ships with LB.

OK, may not be perfect and is a bit pointless but I wanted to see if I could do it.

Go forth and play with it and improve it thereon.

Code:
    nomainwin
    WindowWidth=120
    WindowHeight=144
    open "" for graphics_nsb_nf as #loader
    print #loader, "trapclose [exit]"
    #loader, "fill 0 169 218;flush"
    max=19
    dim pos(max)
    data 160,180,210,230,250,270,280,290,300,310,320,330,340,350,0,10,45,90,130
    for a=1 to max
        read b
        pos(a)=b
    next a

[init]
    dot(1)=19
    dot(2)=17
    dot(3)=15
    dot(4)=13
    dot(5)=11
    count(1)=-1
    count(2)=-3
    count(3)=-5
    count(4)=-7
    count(5)=-9

[display]
    scan
    if segId>2 then #loader,"delsegment ";segId-1
    #loader, "up;home;down;north"
    count=count+1
    for a=1 to 5
        if dot(a)=1 then en(a)=1
        #loader,"size 1;backcolor 0 169 218;color 0 169 218;turn ";pos(olddot(a));";up;go 38;down;circlefilled 4;home;color white;north"
        olddot(a)=dot(a)
    next a
    for a=1 to 5
        if en(a)=1 then
            #loader,"home;north;turn ";pos(dot(a));";up;go 38;down;backcolor white;color white;circlefilled 4"
        end if
        dot(a)=dot(a)+1
        if dot(a)>max then dot(a)=1
        count(a)=count(a)+1
        if count(a)>36 then en(a)=0
    next a
    print #loader,"flush;segment"
    input #loader,segId
    calldll #kernel32,"Sleep",90 as ulong,r as void
    if count(5)>39 then
        count=0
        calldll #kernel32,"Sleep",200 as ulong,r as void
        goto[init]
    end if
    goto[display]

[exit]
    close #loader
    end
 


John.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls