diff --git a/pgfw/Audio.py b/pgfw/Audio.py index f17f1ad..4eb94aa 100644 --- a/pgfw/Audio.py +++ b/pgfw/Audio.py @@ -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 = {} diff --git a/pgfw/Configuration.py b/pgfw/Configuration.py index 61ff315..9f4114e 100644 --- a/pgfw/Configuration.py +++ b/pgfw/Configuration.py @@ -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): diff --git a/pgfw/Game.py b/pgfw/Game.py index 57eb0f8..70f3f4a 100644 --- a/pgfw/Game.py +++ b/pgfw/Game.py @@ -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() diff --git a/pgfw/GameChild.py b/pgfw/GameChild.py index de81bb0..c1f2809 100644 --- a/pgfw/GameChild.py +++ b/pgfw/GameChild.py @@ -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") diff --git a/pgfw/ScreenGrabber.py b/pgfw/ScreenGrabber.py index 8bb6df4..e06e980 100644 --- a/pgfw/ScreenGrabber.py +++ b/pgfw/ScreenGrabber.py @@ -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"):