Ok, but which command do you use to create the wrapper?? I don't know what to put in the:<div>python buildskel.py -n JClic -t JClic -t "JCLic" -m (what should i put here??)</div><div>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)</div>
<div><br></div><div>and in the <a href="http://activity.info">activity.info</a> file, do I have to put som special line?? like the "class" line?? or the "exec" line??</div><div><br></div><div>Thanks! <br>
<div><br><div class="gmail_quote">2008/11/20 Morgan Collett <span dir="ltr"><<a href="mailto:morgan.collett@gmail.com">morgan.collett@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="Wj3C7c">On Wed, Nov 19, 2008 at 23:26, Tomeu Vizoso <<a href="mailto:tomeu@tomeuvizoso.net">tomeu@tomeuvizoso.net</a>> wrote:<br>
> On Wed, Nov 19, 2008 at 4:15 PM, Aleix Palet <<a href="mailto:aleix.palet@gmail.com">aleix.palet@gmail.com</a>> wrote:<br>
>> Here you have it (the implicated parts):<br>
>> from sugar.activity import activity<br>
>> def __init__(self, handle):<br>
>> activity.Activity.__init__(self, handle)<br>
>> toolbox = activity.ActivityToolbox(self)<br>
>> self.set_toolbox(toolbox)<br>
>> toolbox.show()<br>
>> self.project = None<br>
>> self.bgImageOrigin = Point()<br>
>> if handle.object_id == None:<br>
>> f = FileChooser()<br>
>> file = f.chooseFile()<br>
>> pygame.init()<br>
>> self.screen = pygame.display.set_mode((1200, 900), 0, 32)<br>
>> self.load(file, None, None, None)<br>
>><br>
>> def read_file(self, fileame):<br>
>> pygame.init()<br>
>> self.screen = pygame.display.set_mode((1200, 900), 0, 32)<br>
>> self.load(filename, None, None, None)<br>
>> Maybe the problem is how I create the activity?<br>
><br>
> I think the problem is that you are creating a pygame window that<br>
> occupies the whole screen. Just found this code that may help you:<br>
><br>
> <a href="http://code.google.com/p/geoquiz/source/browse/trunk/olpcgames/activity.py" target="_blank">http://code.google.com/p/geoquiz/source/browse/trunk/olpcgames/activity.py</a><br>
<br>
</div></div>The git repository for the olpcgames wrapper for pygame is actually:<br>
<br>
<a href="http://dev.laptop.org/git?p=projects/games-misc;a=summary" target="_blank">http://dev.laptop.org/git?p=projects/games-misc;a=summary</a><br>
<br>
The following links are relevant:<br>
<a href="http://wiki.laptop.org/go/Game_development_HOWTO" target="_blank">http://wiki.laptop.org/go/Game_development_HOWTO</a><br>
<a href="http://wiki.laptop.org/go/Pygame_wrapper" target="_blank">http://wiki.laptop.org/go/Pygame_wrapper</a><br>
<a href="http://wiki.laptop.org/go/Porting_pygame_games_to_the_XO" target="_blank">http://wiki.laptop.org/go/Porting_pygame_games_to_the_XO</a><br>
<br>
Regards<br>
<font color="#888888">Morgan<br>
</font></blockquote></div><br></div></div>