Re: [Plib-users] puFrame Interface
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-04-02 00:44:13
|
peter n squire wrote:
>
> Does any one know if it is possible to create other items on top of
> a puFrame besides just widgets. For example, I would like to display
> 1,000 points on top of the frame-- is this a possiblitiy in PUI?
You can just make your own class - derived from puFrame that has a myFrame::draw
member function that says something like:
void myFrame::draw ( int dx, int dy )
{
puFrame::draw ( dx,dy ) ;
...draw your stuff...
}
...or you could write a callback function and write:
frame -> setRenderCallback ( myfunction, mydata ) ;
...then:
void myfunction ( puObject *, int dx, int dy, void *data )
{
...draw your stuff...
}
There are other ways too - but those are the easiest.
--
----------------------------- Steve Baker -------------------------------
Mail : <sjb...@ai...> WorkMail: <sj...@li...>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
http://prettypoly.sf.net http://freeglut.sf.net
http://toobular.sf.net http://lodestone.sf.net
|