Warning

This is the dev documentation for an unreleased version of MPF!

This is the documentation for MPF 0.56+, which is the “dev” (next) release of MPF that is a work-in-progress. Unless you’re specifically looking for this version, you probably want to use the version of documentation called “latest” which is for the latest released version of MPF. That documentation is at docs.missionpinball.org/en/latest.

slide_player (example config files)

Machine config examples

Here are some example machine-wide config files that show real-world examples of how these configs are used.

#config_version=5
modes:
 - mode1

displays:
  display1:
    height: 400
    width: 300
  display2:
    height: 400
    width: 300
  display3:
    height: 400
    width: 300
    enabled: false

slides:
  slide_with_var:
    - type: text
      text: SLIDE WITH VAR (test)
  slide_condition_foo:
    - type: text
      text: Conditional Slide (FOO)
  slide_condition_bar:
    - type: text
      text: Conditional Slide (BAR)
  machine_slide_1:
    - type: text
      text: TEST SLIDE PLAYER - SLIDE 1
      color: ff0000
      font_size: 100
    - type: rectangle
      width: 400
      height: 300
      color: blue
  machine_slide_2:
    - type: text
      text: TEST SLIDE PLAYER - SLIDE 2
      color: ffaa00
      font_size: 100
    - type: rectangle
      width: 400
      height: 300
      color: purple
  machine_slide_3:
    - type: text
      text: TEST SLIDE PLAYER - SLIDE 3
      color: 00ff00
      font_size: 100
    - type: rectangle
      width: 400
      height: 300
      color: yellow
  machine_slide_4:
    - type: text
      text: TEST SLIDE PLAYER - SLIDE 4
      color: 0000ff
      font_size: 100
    - type: rectangle
      width: 400
      height: 300
      color: pink
  machine_slide_5:
    - type: text
      text: TEST SLIDE PLAYER - SLIDE 5
      color: ff00ff
      font_size: 100
    - type: rectangle
      width: 400
      height: 300
      color: green
  machine_slide_6:
    - type: text
      text: BASE SLIDE
    - type: rectangle
      width: 400
      height: 300
      color: blue
  machine_slide_7:
    widgets:
      - type: text
        text: EXPIRE 1s
        color: red
      - type: rectangle
        width: 400
        height: 300
        color: yellow
    expire: 1s
  machine_slide_8:
    widgets:
    - type: text
      text: EXPIRE 1s
      color: purple
      y: 66%
    - type: text
      text: WITH TRANSITION OUT
      color: purple
      y: 33%
    - type: rectangle
      width: 400
      height: 300
      color: orange
    expire: 1s
    transition_out: wipe
  machine_slide_9:
    widgets:
    - type: text
      text: TRANSITION IN
    - type: rectangle
      width: 400
      height: 300
      color: lime
    transition: move_in
  machine_slide_10:   # used for test_SlidePlayer::test_animation_triggers
    widgets:
    - type: text
      text: WIDGET 1
      animations:
        flash_widget_1:
        - property: opacity
          value: 1
          duration: .25s
        - property: opacity
          value: 0
          duration: .25s
          repeat: yes

slide_player:
  show_slide_1: machine_slide_1
  show_slide_2:
    machine_slide_2:
      target: display1
  show_slide_3:
    machine_slide_3:
      target: display2
  show_slide_4: machine_slide_4
  show_slide_5: machine_slide_5
  show_slide_4_p200:
    machine_slide_4:
      priority: 200
  show_slide_1_force:
    machine_slide_1:
      force: true
  show_slide_display3:
    machine_slide_1:
        target: display3
  anon_slide_dict:
    slide_6:
      type: text
      text: TEXT FROM SLIDE_PLAYER DICT
      color: ff00ff
      font_size: 15
  anon_slide_list:
    slide_7:
      - type: text
        text: TEXT FROM SLIDE_PLAYER LIST
        color: red
        font_size: 15
        y: 66%
      - type: text
        text: WIDGET 2
        color: purple
        font_size: 15
        y: 33%
  anon_slide_widgets:
    slide_8:
      widgets:
      - type: text
        text: TEXT FROM SLIDE_PLAYER WIDGET LIST
        color: green
        font_size: 15
        y: 66%
      - type: text
        text: WIDGET 2
        color: lime
        font_size: 15
        y: 33%
      target: display1
      transition: move_in
  anon_slide_widgets2:
    slide_8:
      widgets:
      - type: text
        text: Another text
        color: green
        font_size: 15
        y: 66%
      target: display1
      transition: none
  base_slide_no_expire: machine_slide_6
  new_slide_expire:
    machine_slide_1:
      expire: 1s
  show_slide_7: machine_slide_7
  show_slide_8: machine_slide_8
  show_slide_9: machine_slide_9
  show_slide_5_with_transition:
    machine_slide_5:
      transition: fade
  show_slide_9_with_transition:
    machine_slide_9:
      transition: fade
  slide_2_dont_show:
    machine_slide_2:
      show: no
  remove_slide_4:
    machine_slide_4:
      action: remove
  remove_slide_4_with_transition:
    machine_slide_4:
      action: remove
      transition: wipe
  remove_slide_8:
    machine_slide_8:
      action: remove
  remove_slide_8_fade:
    machine_slide_8:
      action: remove
      transition: fade
  slide1_expire_1s:
    machine_slide_1:
      expire: 1s
  slide2_expire_1s:
    machine_slide_2:
      expire: 1s
  random_player_with_animations:  # used for test_SlidePlayer::test_animation_triggers
    random_slide:
      widgets:
      - type: text
        text: WIDGET 1
        animations:
          flash_widget_2:
          - property: opacity
            value: 1
            duration: .25s
          - property: opacity
            value: 0
            duration: .25s
            repeat: yes
  show_slide_with_animations:
    my_slide:
      widgets:
      - type: text
        text: WIDGET 1
        animations:
          pre_show_slide:
          - property: opacity
            value: 1
            duration: .25s
          - property: opacity
            value: 0
            duration: .25s
            repeat: yes
  remove_slide_with_animations:
    my_slide: remove
  show_slide_with_var:
    slide_with_var:
      tokens:
        test: asd
  show_conditional_slide:
    slide_condition_foo{var=="foo"}:
      action: play
    slide_condition_bar{var=="bar"}:
      action: play

Mode config examples

Here are some example mode config files that go along with the machine-wide config above.

#config_version=5

mode:
  priority: 500

slides:
  mode1_slide:
    type: text
    text: MODE 1 SLIDE 1
    color: 00ff00
    font_size: 100
  mode1_slide_2:
    type: text
    text: MODE 1 SLIDE 2
    color: 00ffff
    font_size: 150

slide_player:
  show_mode1_slide: mode1_slide
  remove_mode1_slide:
    mode1_slide: remove
  show_mode1_slide_2:
    mode1_slide_2:
      priority: -350