Skip to content

Commit 77b3f50

Browse files
committed
document carousel events per 0.80.0.dev9
1 parent 2187939 commit 77b3f50

File tree

7 files changed

+102
-0
lines changed

7 files changed

+102
-0
lines changed

docs/events/carousel/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Carousel event index
3+
---
4+
5+
# Carousel Events
6+
7+
These events are posted by the built-in Carousel mode.
8+
9+
See: [Carousel Mode Selection](../../cookbook/carousel.md) for pre-0.80 carousel configuration.
10+
11+
See: [MPFCarousel](../../gmc/reference/mpf-carousel.md) for 0.80+ carousel configuration.
12+
13+
* [item_highlighted](../item_highlighted.md) *Note: 0.80+ only*
14+
* [(carousel_name)\_items_empty](../carousel_name_items_empty.md)
15+
* [(carousel_name)\_(item_name)\_selected](../carousel_name_item_name_selected.md)
16+
* [(carousel_name)\_item_selected](../carousel_name_item_selected.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: (carousel_name)_(item_name)_selected
3+
---
4+
5+
# (carousel_name)\_(item_name)\_selected
6+
7+
8+
--8<-- "event.md"
9+
10+
The carousel named (carousel_name) has just had the item named (item_name) get selected.
11+
12+
--8<-- "event_no_keywords_notice.md"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: (carousel_name)_item_selected
3+
---
4+
5+
# (carousel_name)\_item_selected
6+
7+
8+
--8<-- "event.md"
9+
10+
The carousel named (carousel_name) has just had an item selected.
11+
This event does not include the item name, and is generally used
12+
to close or end the carousel mode rather than to select the next mode.
13+
14+
--8<-- "event_no_keywords_notice.md"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: (carousel_name)_items_empty
3+
---
4+
5+
# (carousel_name)\_item_empty
6+
7+
8+
--8<-- "event.md"
9+
10+
The carousel named (carousel_name) determined that it has
11+
no selectable_items that are valid for display. This can be because
12+
the `mode_settings` for the carousel mode still needs to be set,
13+
or because all of the `selectable_items` were dynamically evaluated
14+
and removed from the valid option set.
15+
16+
--8<-- "event_no_keywords_notice.md"

docs/events/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ will posted an event called *switch_s_left_slingshot_active*.
288288
* [bonus_start](bonus_start.md)
289289
* [bonus_subtotal](bonus_subtotal.md)
290290

291+
* [Carousel Events](carousel/index.md)
292+
* [item_highlighted](item_highlighted.md)
293+
* [(carousel_name)\_items_empty](carousel_name_items_empty.md)
294+
* [(carousel_name)\_(item_name)\_selected](carousel_name_item_name_selected.md)
295+
* [(carousel_name)\_item_selected](carousel_name_item_selected.md)
296+
291297
* Config Player Events
292298
* [clear](clear.md)
293299

docs/events/item_highlighted.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: item_highlighted
3+
---
4+
5+
# item_highlighted
6+
7+
8+
--8<-- "event.md"
9+
10+
An item was highlighted in a carousel. This event is posted
11+
when the carousel initially displays and highlights its initial item
12+
and also when moving the carousel to the next or previous item.
13+
14+
## Keyword arguments
15+
16+
(See the [Conditional Events](overview/conditional.md)
17+
guide for details for how to create entries in your config file that
18+
only respond to certain combinations of the arguments below.)
19+
20+
#### `carousel`:
21+
22+
The name of the carousel that had an item selected.
23+
24+
#### `direction`:
25+
26+
The direction that the highlight change was performed in. Can be any of:
27+
28+
"forwards", "backwards", or `None`. Note that `None` is the Python keyword, not the string "None".
29+
30+
#### `item`:
31+
32+
The string name of the newly-highlighted item.

mkdocs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,12 @@ nav:
12091209
- bonus_multiplier: events/bonus_multiplier.md
12101210
- bonus_start: events/bonus_start.md
12111211
- bonus_subtotal: events/bonus_subtotal.md
1212+
- Carousel Events:
1213+
- events/carousel/index.md
1214+
- carousel_name_items_empty: events/carousel_name_items_empty.md
1215+
- carousel_name_item_name_selected: events/carousel_name_item_name_selected.md
1216+
- carousel_name_item_selected: events/carousel_name_item_selected.md
1217+
- item_highlighted: events/item_highlighted.md
12121218
- Config Player Events:
12131219
- clear: events/clear.md
12141220
- Credit Events:

0 commit comments

Comments
 (0)