1 import gui
, pygame
, os
, time
, mod
, cfg
2 from pygame
.locals import *
4 class Module(mod
.Module
):
5 def __init__(self
, screen
):
6 mod
.Module
.__init
__(self
, screen
)
8 self
.addloop('PlaylistUpdate', self
._listupd
)
10 def keyhandler(self
, event
):
11 if event
.type == KEYDOWN
:
12 if event
.key
== K_LEFT
: self
._quit
()
13 if event
.key
== K_ESCAPE
: self
._quit
()
16 cfg
.modname
= 'mainmenu'
17 cfg
.modcf
= cfg
.cf
['modules'][cfg
.modname
]
18 self
.loadmodule
= cfg
.modname
22 self
.changebykey('PLAYLIST-5', playlist
.PLAYLIST
.track(True, -5))
23 self
.changebykey('PLAYLIST-4', playlist
.PLAYLIST
.track(True, -4))
24 self
.changebykey('PLAYLIST-3', playlist
.PLAYLIST
.track(True, -3))
25 self
.changebykey('PLAYLIST-2', playlist
.PLAYLIST
.track(True, -2))
26 self
.changebykey('PLAYLIST-1', playlist
.PLAYLIST
.track(True, -1))
27 self
.changebykey('PLAYLIST+1', playlist
.PLAYLIST
.track(True, 1))
28 self
.changebykey('PLAYLIST+2', playlist
.PLAYLIST
.track(True, 2))
29 self
.changebykey('PLAYLIST+3', playlist
.PLAYLIST
.track(True, 3))
30 self
.changebykey('PLAYLIST+4', playlist
.PLAYLIST
.track(True, 4))
31 self
.changebykey('PLAYLIST+5', playlist
.PLAYLIST
.track(True, 5))