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

Re: [pygame] How to add text boxes and buttons



That's all a bit greek right now, but I will learn how to use it and ask again.

Thanks so far.

Johan

Ben Olsen wrote:
Marcus includes a large selection of examples to look at in the "doc"
directory. But the basic idea is:

1) Create a Renderer
2) Set up whatever widgets you need in the various game classes you've
written
3) Add the widgets to the Renderer

Personally I like to have all my game classes inherit from
ocempgui.object.BaseObject, so that I can easily control which signals
(the Renderer version of Events) get picked up by which objects. The
guiclient.py in the "chat" examples is a good place to see how to do
that.

Ben

  
-----Original Message-----
From: owner-pygame-users@xxxxxxxx [mailto:owner-pygame-users@xxxxxxxx]
    
On
  
Behalf Of Johan Geldenhuys
Sent: Wednesday, December 21, 2005 2:28 PM
To: pygame-users@xxxxxxxx
Subject: Re: [pygame] How to add text boxes and buttons

Downloading it now over my GPRS internet connection, so it's a bit
    
slow.
  
It looks great though.

For learning, what is the best way going about it? Creating rects
    
in/on
  
the surface? I'm still learning the lingo. ;-)

Johan