user-event-id renamed to custom-event-id

This commit is contained in:
Frank DeMarco 2012-07-31 14:44:26 -04:00
parent 3bc51f264d
commit ff50528e09
5 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ class Audio(GameChild):
def __init__(self, game):
GameChild.__init__(self, game)
self.load_fx()
self.subscribe_to(self.get_user_event_id(), self.mute)
self.subscribe_to(self.get_custom_event_id(), self.mute)
def load_fx(self):
fx = {}

View File

@ -101,7 +101,7 @@ class Configuration(RawConfigParser):
set_option(section, "capture-screen", "K_F9")
section = "event"
add_section(section)
set_option(section, "user-event-id", "USEREVENT")
set_option(section, "custom-event-id", "USEREVENT")
set_option(section, "command-event-name", "command")
def read(self, filenames):

View File

@ -27,7 +27,7 @@ class Game(GameChild, Animation):
pygame.init()
self.set_children()
self.subscribe_to(QUIT, self.end)
self.subscribe_to(self.get_user_event_id(), self.end)
self.subscribe_to(self.get_custom_event_id(), self.end)
self.clear_queue()
self.delegate.enable()

View File

@ -63,9 +63,9 @@ class GameChild:
def is_debug_mode(self):
return "-d" in argv
def get_user_event_id(self):
def get_custom_event_id(self):
return globals()[self.get_configuration().get("event",
"user-event-id")]
"custom-event-id")]
def is_command(self, evt, cmd):
name = self.get_configuration().get("event", "command-event-name")

View File

@ -12,7 +12,7 @@ class ScreenGrabber(GameChild):
def __init__(self, game):
GameChild.__init__(self, game)
self.subscribe_to(self.get_user_event_id(), self.save_display)
self.subscribe_to(self.get_custom_event_id(), self.save_display)
def save_display(self, event):
if self.is_command(event, "capture-screen"):