Skip to content

Commit

Permalink
Support conditional event handlers on slide player (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle authored and jabdoa2 committed Feb 16, 2018
1 parent 22bc1ff commit 4525a0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mpfmc/config_players/slide_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ def play(self, settings, context, priority=0, **kwargs):
settings = settings['slides']

for slide, s in settings.items():
slide_dict = self.machine.placeholder_manager.parse_conditional_template(slide)

if slide_dict["condition"] and not slide_dict["condition"].evaluate(kwargs):
continue
slide = slide_dict["name"]

s.update(kwargs)

if s["slide"]:
Expand Down

0 comments on commit 4525a0a

Please sign in to comment.