[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] OcempGUI



On, Wed Apr 13, 2005, Rene Dudfield wrote:

> Hey Marcus,
> 
> That looks interesting!
> 
> It would be good if you had a little example or tutorial on your site
> so we can get a feel of how the api works.
> 

Examples are located within in the demo subdirectory of the package.
Unfortunately there is no api documentation nor any written tutorial
available at the moment, but the demos should give you a first
impression about how to use it.
However, not all possibilities (methods and attributes) are used in the
demos, but they are documented, so a `pydoc widget_to_see` should help a
lot.

The basic usage is as follows:

import ocempgui                 # import module
from ocempgui.widgets import *  # import all existing widgets

ocempgui.init ()                # initialize the library (calls pygame.init())

# create a new pygame window with 200x200 size and "Button demo" as title
re = Renderer ("Button demo", 200, 200)

re.start ()                     # start the main loop for the events and
                                # renderering

Widgets are created using the matching constructor call and (most
important) blitted on the screen using the show() method.

A (more or less good) documentation will be available with the
next version, but I have no idea, when this will be.

Regards
Marcus