Changeset 166:0ad313ec564d


Ignore:
Timestamp:
Apr 5, 2011, 10:19:33 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Set key repeating.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/__main__.py

    r127 r166  
    1010from . import options
    1111from .constants import SCREEN, FREQ, BITSIZE, CHANNELS, BUFFER, DEBUG
     12from .constants import KEY_REPEAT_DELAY_MS, KEY_REPEAT_INTERVAL_MS
    1213from .engine import Engine
    1314from .levelscene import LevelScene
     
    5556    #    data.filepath('icons/nine_tales24x24.png')))
    5657    pygame.display.set_caption("Nine Tales")
     58    pygame.key.set_repeat(KEY_REPEAT_DELAY_MS, KEY_REPEAT_INTERVAL_MS)
    5759
    5860    engine = Engine()
  • skaapsteker/constants.py

    r66 r166  
    77CHANNELS = 2   # 1 == mono, 2 == stereo
    88BUFFER = 1024  # audio buffer size in no. of samples
     9
     10KEY_REPEAT_DELAY_MS = 250
     11KEY_REPEAT_INTERVAL_MS = 50
    912
    1013DEBUG = True
Note: See TracChangeset for help on using the changeset viewer.