Changeset 677:e56449284b21 for nagslang


Ignore:
Timestamp:
Sep 8, 2013, 5:06:11 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
rebase_source:
5b43ecae2d4dbaac2203413b826f66da4fd43477
Message:

Set the icon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/__main__.py

    r447 r677  
    88from nagslang.engine import Engine
    99from nagslang.sound import sound
     10from nagslang.resources import Resources
    1011
    1112
     
    1516    pygame.display.init()
    1617    pygame.font.init()
     18
     19    # set_icon needs to be called before set_mode on some platforms, but we
     20    # can't use convert_alpha until we've created a window with set_mode
     21    r = Resources('data')
     22    r.CONVERT_ALPHA = False
     23    pygame.display.set_icon(r.get_image('werewolf-sonata_24.png',
     24                                        basedir='icons'))
     25
    1726    pygame.display.set_mode(SCREEN, pgl.SWSURFACE | pgl.RESIZABLE)
    18     #pygame.display.set_icon(load_image(...))
    1927    pygame.display.set_caption('Werewolf Sonata')
    2028    sound.init()
Note: See TracChangeset for help on using the changeset viewer.