summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b0768fe)
-from pygame.locals import USEREVENT
-TIMEOUT = USEREVENT + 1
-NOTEON = USEREVENT + 2
-NOTEOFF = USEREVENT + 3
-NOTEEND = USEREVENT + 4
-COLDOWN = USEREVENT + 5
-COLUP = USEREVENT + 6
-COLOVER = USEREVENT + 7
\ No newline at end of file
+import pygame
+base = pygame.USEREVENT
+print 'events base :', pygame.USEREVENT
+TIMEOUT = base + 1
+NOTEON = base + 2
+NOTEOFF = base + 3
+NOTEEND = base + 4
+COLDOWN = base + 5
+COLUP = base + 6
+COLOVER = base + 7
+
+pygame.USEREVENT = COLOVER
+if pygame.USEREVENT > pygame.NUMEVENTS :
+ pygame.NUMEVENTS = pygame.USEREVENT
import pygame
from pygame.locals import QUIT, MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION, KEYDOWN, USEREVENT
import pygame
from pygame.locals import QUIT, MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION, KEYDOWN, USEREVENT
-ENTER = pygame.locals.USEREVENT + 0
-EXIT = pygame.locals.USEREVENT + 1
-BLUR = pygame.locals.USEREVENT + 2
-FOCUS = pygame.locals.USEREVENT + 3
-CLICK = pygame.locals.USEREVENT + 4
-CHANGE = pygame.locals.USEREVENT + 5
-OPEN = pygame.locals.USEREVENT + 6
-CLOSE = pygame.locals.USEREVENT + 7
-INIT = 'init'
+base = pygame.USEREVENT
+print 'pgu base:', base
+ENTER = base + 0
+EXIT = base + 1
+BLUR = base + 2
+FOCUS = base + 3
+CLICK = base + 4
+CHANGE = base + 5
+OPEN = base + 6
+CLOSE = base + 7
+INIT = 'init'
+
+pygame.USEREVENT = CLOSE
+if pygame.USEREVENT > pygame.NUMEVENTS :
+ pygame.NUMEVENTS = pygame.USEREVENT
class NOATTR: pass
\ No newline at end of file
class NOATTR: pass
\ No newline at end of file
--- /dev/null
+#
\ No newline at end of file
# events to use. Is there a way to get ones known to be unused?
base = pygame.USEREVENT
# events to use. Is there a way to get ones known to be unused?
base = pygame.USEREVENT
+print 'pygame_wiimote base :', pygame.USEREVENT
WIIMOTE_BUTTON_PRESS = base + 1
WIIMOTE_BUTTON_RELEASE = base + 2
WIIMOTE_ACCEL = base + 3
WIIMOTE_BUTTON_PRESS = base + 1
WIIMOTE_BUTTON_RELEASE = base + 2
WIIMOTE_ACCEL = base + 3
NUNCHUK_JOY = base + 8
WIIMOTE_STATUS = base + 9
WIIMOTE_DISCONNECT = base + 10
NUNCHUK_JOY = base + 8
WIIMOTE_STATUS = base + 9
WIIMOTE_DISCONNECT = base + 10
+pygame.USEREVENT = WIIMOTE_DISCONNECT
+if pygame.USEREVENT > pygame.NUMEVENTS :
+ pygame.NUMEVENTS = pygame.USEREVENT
+
wiiuse = None # import within the thread, why do I have to do this?
wiiuse = None # import within the thread, why do I have to do this?