[sugar] Differents behaviours of my application

Morgan Collett morgan.collett at gmail.com
Thu Nov 20 04:39:46 EST 2008


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


More information about the Sugar mailing list