[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] pyui & pygame



On Fri, 2002-08-16 at 21:02, Pete Shinners wrote:
> Ian Bicking wrote:
> > Anyway, I want to use pyUI, but I'm unclear how to do that while writing
> > the tiles through pygame.  It seems like this is probably really easy,
> > but it's not in the pyUI documentation, and I thought people here would
> > probably know -- when I do pyui.init(...) it takes over the main
> > screen.  Is there a way that I can give only part of the screen to pyUI,
> > or have pyUI give part of the screen back to me?  
> 
> pyui is sort of an "all or nothing" kind of thing. it takes over the 
> display surface and input events once you start it. this means you 
> could potentially use it for screens like config, load, and save. 
> it's strength is not for doing in game interfaces. unfortunately 
> there's nothing to really fill this position. currently there are a 
> few folks working on something like this, but nothing that's ready 
> for business.

Bummer... would it be possible to make my screen a widget in pyUI?  This
might not work if you wanted the widgets to go over your screen, but if
you just want to reserve a rectangle for your game, perhaps... I'm
wondering if it's possible to subclass pyui.widgets.Frame, overriding
the draw method... though I can't decide if Frame, Window, or Panel is
the best thing to override.  Hmm... I'll try experimenting a bit.

> depending on the type of interface you need. it can be very simple 
> to create your own. simple tools like push bottons, toggles, and 
> whatnot are not difficult. even simple menus and text boxes won't 
> take much to add. but anything more than that and it will become a 
> big project.

That's all I'll need in the beginning, but I'm sure I'll need more
later... it'd be nice not to have to rewrite my main loop as I add
things.  

  Ian


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org