[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] ANNOUNCE: beta 0.1 of sForzando
> Two pestering question.
> How comprehensive are the GUI tools going to be?
> Stuff like drop down menus, loading and saving boxes, check boxes and lists
> all would be useful in Pyzzle.
I'm going to try to make them as comprehensive as possible, since sForce
itself will be written completely using sForzando. Check boxes, radio
buttons etc will be really easy to implement; drop-down or "hover" menus will
be only slightly harder. I have some idea of how to implement file
loading/saving dialogs, but this will take a little longer to do. In any
case, all these things will be in beta 0.2, and on CVS much sooner than that.
> I am still trying to decide how to do the menus in Pyzzle, weather to use
> tcl/tk, PyUI and now sForzando. Talk about tonnes of cool options, open
> sources rocks.
It does doesn't it? ;) Personally I use almost all open-source software for
development; I used to work with Visual C++ on windows and actually find the
Linux programming environment (emacs+gcc+gdb+python+cvs) to be much easier to
use, and it didn't cost me a cent.
> What functions will the draggable object stuff have?
> For example if a player drags a key to a lock but misses the lock will the
> key hover back to the games objects box? Stuff like that.
There's no reason it couldn't do that. The way Draggable works, you pass in
a callback function that gets called whenever the object is dragged. That
callback function takes as a parameter a sequence containing a "drag offset"
(so if the player drags down 3 pixels and to the left 2 pixels, the drag
offset would be [-2, 3]). The callback function would then move the actual
object by that amount. You could also have functions called just when a drag
operation began and just when it ended. So here's some pseudocode of how you
might implement that:
def start_dragging():
self.original_pos = self.trans
def dragging(offset):
self.trans[0] += offset[0]
self.trans[1] += offset[1]
def stop_dragging():
if not target_rect.contains(self.get_rect()):
# do an animation to move the key back to self.original_pos
Of course this is just pseudocode - a real implementation would have to be a
little more complicated than this one, but not much.
> It looks cool, I cannot wait to have a good play with it.
> Keep on coding
Thanks man; peace and good luck with Pyzzle, it looks really neat.
Nat
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org