From: Takaaki T. <tt...@ja...> - 2001-09-04 05:24:11
|
At Mon, 3 Sep 2001 21:07:07 -0700 (PDT), Kevin Smith wrote: > I spent most of today porting my Space Monkeys game from > GTK to FLTK. It has gone really smoothly, and the code is > definitely simpler in FTLK. It's good to see a real > application using our work. It's great! > I thought I would need idle or timeouts, but I ended up > changing the structure so I don't need them. The game is > now completely functional, but I don't like the way the > command buttons work, so I'm going to change that. I think it would be effective to use Thread and sleep in your ruby script now. For example: button.callback(somedata){|win,data| Thread.start{ sleep(anytime) ... } } But in current version of Ruby/FLTK, threads is scheduled at intervals of 0.5sec. This mechanism is implemented using add_timeout() and repeat_timeout(), and you can see it in fltk.cc. Of course, we should implement add_timeout() and add_idle() in the *near* future. I will add those function in this week. > I can definitely see that I want to add more classes in > fltk.rb: > - RadioButton class, that wraps RoundButton, automatically > sets the button type, and automatically sizes itself > - PushButton class that can automatically size itself > - ComboBox class that combines an editor with a listbox I agree with you. Practically, we often want to use ComboBox, but it takes a few time to create ComboxBox class. > I'm also really looking forward to the layout management > stuff that will be in FLTK 2. Pack is not very good, and I > hate placing widgets individually. I also think so. -- Takaaki Tateishi <tt...@ja...> |