Hi all, i am a bit stuck with a program that is running far too fast
it is an 3d implementation on the game of life and i am not sure where
and or how to place fl timeouts, or even if that is the right option.

i am referring to
Fl::add_timeout(0.1, function);
Fl::repeat_timeout(0.1, function);

Ideally i would like to add buttons that can allow user to speed up
or slow down the animation from a default 'medium speed' execution

The flow breaks down to this:

//start button callback calls 'UpdateWorld()'to begin algorithm then its

#include<string>
#include<vector>
#include "fluidUI.h"
#include "Life.h"

void UpdateWorld()
{
    while(running)
    {
        //code to examine each cell and determine its status
        //
        //
        Fl::check();
        if(running)  //button callback controls bool member
        DrawWorld(); //step through arrays drawing live cells or not
                     //includes call to cellGrp->redraw()before returns
    }
}

I am not sure if Fl::add_check() might be the choice
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to