Skip to content

Overwriting Tilt Slides

The tilt mode comes with very basic slides. You can overwrite them using the following config:

#! switches:
#!   s_tilt:
#!     number:
#!     tags: tilt_warning
##! mode: tilt
# in your modes/config/tilt.yaml
slides:
  _overwrite: true   # this is important to overwrite the existing slides
  tilt_warning_1:
    widgets:
      - type: text
        text: "STOP IT"
    expire: 1s
  tilt_warning_2:
    widgets:
      - type: text
        text: WARNING
        y: top-2
        anchor_y: top
      - type: text
        text: "SERIOUSLY STOP IT"
        y: top-18
        anchor_y: top
        expire: 1s
    expire: 2s
  tilt:
    - type: text
      text: TILT
##! test
#! start_game
#! post slam_tilt
#! advance_time_and_run .1
#! assert_mode_running tilt
#! hit_and_release_switch s_tilt
#! advance_time_and_run .1
#! assert_text_on_top_slide "STOP IT"
#! advance_time_and_run 2
#! assert_text_not_on_top_slide "STOP IT"
#! hit_and_release_switch s_tilt
#! advance_time_and_run .1
#! assert_text_on_top_slide "SERIOUSLY STOP IT"

By setting the _overwrite: true you will overwrite the complete slides: section of the built-in tilt mode. The slides above are the default slides.

Note

You can add a slide for the slam_tilt event. However, by default the tilt slide is also shown at the same time so you have to make sure that your slide has a higher priority than that slide.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results