Skip to content

Commit

Permalink
MPFCarousel reference
Browse files Browse the repository at this point in the history
  • Loading branch information
avanwinkle committed Apr 14, 2024
1 parent 5a2bf59 commit 16ce1a6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file added docs/gmc/images/carousel_children.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/gmc/reference/mpf-carousel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: MPFCarousel
---

# MPFCarousel

The `MPFCarousel` node works in tandem with the MPF Carousel mode to support dynamic content switching based on rotation events (a timer, flipper presses, or anything else).

!!! note "Requires MPF 0.80"

The MPF 0.80 events that drive the `MPFCarousel` are changed from those in MPF 0.57. If you have an existing MPF 0.5 carousel you may need to update your event handlers.

## Node Configuration

Add an `MPFCarousel` node to your slide and create child nodes for each carousel item you wish to render. You can use the eyeball icon in the *Scene* panel to preview what each carousel item will look like. Each child node needs to have a name that corresponds to one of the `selectable_items:` in your MPF config file.

![image](../images/carousel_children.png)

When the MPF Carousel mode selects an item to display, it will post event with the name of the carousel mode and the name of the selected item. The `MPFCarousel` node will then iterate through its child nodes and hide all children except one with the same name as the selected item.

### carousel_name:

Single value, type `String`. Default `None`.

This is the name of the carousel mode in MPF that will be triggering changes. The name is required so that GMC can correctly identify in case multiple carousels are active at once.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ nav:
- Sound: gmc/sound.md
- Config Reference:
- gmc/reference/index.md
- MPFCarousel: gmc/reference/mpf-carousel.md
- MPFDisplay: gmc/reference/mpf-display.md
- MPFSlide: gmc/reference/mpf-slide.md
- MPFVariable: gmc/reference/mpf-variable.md
Expand Down

0 comments on commit 16ce1a6

Please sign in to comment.