[sugar] Differents behaviours of my application

Aleix Palet aleix.palet at gmail.com
Sat Nov 22 10:43:56 EST 2008


Ok, but which command do you use to create the wrapper?? I don't know what
to put in the:python buildskel.py -n JClic -t JClic -t "JCLic" -m (what
should i put here??)
Because i unferstand it when you create a game with a "main" funcion, but
when there is no main?? (only __init__, read_file, write_file as a sugar
activity)

and in the activity.info file, do I have to put som special line?? like the
"class" line?? or the "exec" line??

Thanks!

2008/11/20 Morgan Collett <morgan.collett at gmail.com>

> On Wed, Nov 19, 2008 at 23:26, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> > On Wed, Nov 19, 2008 at 4:15 PM, Aleix Palet <aleix.palet at gmail.com>
> wrote:
> >> Here you have it (the implicated parts):
> >> from sugar.activity import activity
> >> def __init__(self, handle):
> >>         activity.Activity.__init__(self, handle)
> >> toolbox = activity.ActivityToolbox(self)
> >> self.set_toolbox(toolbox)
> >> toolbox.show()
> >>         self.project = None
> >>         self.bgImageOrigin = Point()
> >> if handle.object_id == None:
> >>    f = FileChooser()
> >>    file = f.chooseFile()
> >>      pygame.init()
> >>    self.screen = pygame.display.set_mode((1200, 900), 0, 32)
> >>    self.load(file, None, None, None)
> >>
> >>     def read_file(self, fileame):
> >> pygame.init()
> >> self.screen = pygame.display.set_mode((1200, 900), 0, 32)
> >>         self.load(filename, None, None, None)
> >> Maybe the problem is how I create the activity?
> >
> > I think the problem is that you are creating a pygame window that
> > occupies the whole screen. Just found this code that may help you:
> >
> >
> http://code.google.com/p/geoquiz/source/browse/trunk/olpcgames/activity.py
>
> The git repository for the olpcgames wrapper for pygame is actually:
>
> http://dev.laptop.org/git?p=projects/games-misc;a=summary
>
> The following links are relevant:
> http://wiki.laptop.org/go/Game_development_HOWTO
> http://wiki.laptop.org/go/Pygame_wrapper
> http://wiki.laptop.org/go/Porting_pygame_games_to_the_XO
>
> Regards
> Morgan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20081122/4a75abad/attachment.html>


More information about the Devel mailing list