Results 1 to 3 of 3

Thread: [?]How draw something every 5sec and keep it drawn for 2sec

  1. #1

    [?]How draw something every 5sec and keep it drawn for 2sec

    How draw something every 5sec for 2sec {so 3 sec interval}

    im using sdl so i have acess to SDL_getticks that is similar to gettickcount

    any ideia how to do that ?
    From brazil (:

    Pascal pownz!

  2. #2

    [?]How draw something every 5sec and keep it drawn for 2sec

    Presumably you have a timer that fire up sometimes? Well why not make a simple object that include a variable

    Show : boolean
    Switch : longint

    Show := false;
    switch := TimeGetTime+ 3000;


    in you loop

    [pascal]if TimeGetTime > switch then
    begin
    Show := not Show ;
    if not show then switch := TimeGetTime+ 2000
    else switch := TimeGetTime+ 3000;
    end;[/pascal]
    The views expressed on this programme are bloody good ones. - Fred Dagg

  3. #3

    [?]How draw something every 5sec and keep it drawn for 2sec

    thx it work
    From brazil (:

    Pascal pownz!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •