widgets (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.
Note that there are multiple machine config examples here. They’re just included to show different options. You wouldn’t actually use more than one.
#config_version=5
modes:
- mode1
displays:
default:
width: 800
height: 600
widgets:
widget1:
type: text
text: widget1
color: ffff00
font_size: 100
y: top-40%
widget2:
- type: text
text: widget2
y: 50
color: ff0000
font_size: 100
widget3:
- type: text
text: widget3.1
color: ff0000
font_size: 100
- type: text
text: widget3.2
color: 00ff66
font_size: 100
- type: text
text: widget3.3
color: ff00ff
font_size: 100
widget4:
- type: text
text: widget4.1
y: 300
z: 1
color: ff0000
font_size: 100
- type: text
text: widget4.2
z: 1000
y: 250
color: ffff00
font_size: 100
- type: text
text: widget4.3
y: 200
color: 00ff00
font_size: 100
- type: text
text: widget4.4
z: 1
y: 150
color: 00ffff
font_size: 100
- type: text
text: widget4.5
z: 1000
y: 100
color: 0000ff
font_size: 100
- type: text
text: widget4.6
color: ff00ff
font_size: 100
y: 50
- type: text
text: widget4.7
y: 0
color: 888888
font_size: 100
widget5:
type: text
text: widget5
z: 200
y: 150
font_size: 100
widget6:
type: text
text: widget6
z: 100
color: 774303
font_size: 100
widget7:
type: text
text: EXPIRES 1S (player|test)
color: orange
font_size: 100
expire: 1s
animations:
test_event:
- property: rotation
value: 360
duration: .5s
widget8:
type: text
text: WIDGET 8
color: orange
font_size: 100
box11:
- type: text
text: box11
box12:
- type: text
text: box12
box13:
- type: text
text: box13
box14:
- type: text
text: box14
widget9:
- type: text
text: named_widget9
key: widget9_key
widget10:
type: text
text: (text)
widget_bezier:
- type: bezier
points: 400, 300, 100, 100, 400, 0
color: red
thickness: 5
animations:
add_to_slide:
- property: color, points
value: 0, 1, 0, 1, 200, 200, 50, 100, 100, 250
duration: 2s
- property: rotation
value: -300
duration: 2s
timing: with_previous
- property: color
value: 0, 0, 1, 1
duration: 1s
- property: color
value: 1, 1, 0, 1
duration: 1s
widget_ellipse:
- type: ellipse
width: 200
height: 100
angle_end: 0
color: magenta
opacity: 0.5
animations:
add_to_slide:
- property: pos
value: 100, 100
relative: true
duration: 2s
- property: rotation
value: 360
duration: 2s
timing: with_previous
widget_quad:
- type: quad
points: 300, 100, 350, 200, 500, 150, 450, 50
color: cornflowerblue
animations:
add_to_slide:
- property: points
value: 50, -50, -50, 50, 50, -50, -50, 50
duration: 1.5
relative: true
- property: rotation, scale
value: -720, -0.9
relative: true
duration: 1.5s
timing: with_previous
- property: points
value: -50, 50, 50, -50, -50, 50, 50, -50
duration: 1.5
relative: true
- property: rotation, scale
value: 720, 0.9
relative: true
duration: 1.5s
timing: with_previous
widget_rectangle:
- type: rectangle
x: 600
y: 300
width: 100
height: 200
color: gold
animations:
add_to_slide:
- property: rotation, scale, corner_radius
value: 540, 0.5, 50
duration: 1.5s
- property: scale
value: 0.5
duration: 1.0s
- property: rotation, scale, corner_radius
value: 0, 1.0, 0
duration: 1.5s
widget_line:
- type: line
points: 200, 50, 600, 50
thickness: 10
color: darkcyan
animations:
add_to_slide:
- property: rotation, scale
value: 360, 1.5
duration: 3s
widget_triangle:
- type: triangle
points: 100, 450, 100, 550, 200, 450
color: lawngreen
animations:
add_to_slide:
- property: rotation, scale
value: -900, 1.5
duration: 3s
easing: in_quint
widget_points:
- type: points
points: 100, 450, 100, 550, 200, 450
pointsize: 2
color: deeppink
animations:
add_to_slide:
- property: rotation, scale, pointsize
value: 900, 1.5, 8
duration: 3s
easing: in_quint
widget_text:
- type: text
text: TEST
font_size: 50
bold: true
color: lightyellow
animations:
add_to_slide:
- property: rotation, scale
value: 45, 1.5
duration: 2s
easing: in_quint
- property: scale
value: 0.75
duration: 1s
easing: out_quint
widget_reusable:
- type: text
text: Reusable Widget
widget_placeholder_value1:
- type: text
text: Value One
widget_placeholder_value2:
- type: text
text: Value Two
widget_custom_events1:
- type: text
text: Testing events
events_when_added: custom_events1_added
events_when_removed: custom_events1_removed
widget_custom_events2:
- type: rectangle
x: 600
y: 300
width: 100
height: 200
color: gold
events_when_added: custom_events2_added, custom_events2_added_again
events_when_removed: custom_events2_removed, custom_events2_removed_again
widget_player:
add_widget1_to_current: widget1
add_widget2_to_current: widget2
add_widget2_to_slide1:
widget2:
slide: slide1
update_widget2:
widget2:
action: update
slide: slide1
remove_widget2:
widget2:
action: remove
add_widget6:
widget6:
widget_settings:
z: -1
remove_widget1_by_key:
widget1:
action: remove
key: widget1
remove_widget1:
widget1:
action: remove
add_widget7: widget7
add_widget8_expire:
widget8:
widget_settings:
expire: 1s
add_widget8_expire_parent:
widget8:
widget_settings:
expire: 1s
z: -1
add_widget8_custom_settings:
widget8:
widget_settings:
color: red
font_size: 70
x: right-10
anchor_x: right
add_widget8_opacity_50:
widget8:
widget_settings:
opacity: .5
text: 50% OPACITY
font_size: 50
widget1:
action: add
event_a:
widget1:
action: update
widget_settings:
text: A
color: red
event_s:
widget1:
action: update
widget_settings:
text: S
color: lime
event_d:
widget1:
action: update
widget_settings:
text: D
color: blue
widget_4up:
box14:
widget_settings:
x: 25
expire: 6s
box13:
widget_settings:
x: 105
expire: 6s
box12:
widget_settings:
x: 185
expire: 6s
box11:
widget_settings:
x: 265
expire: 6s
widget_4up_red:
box14:
widget_settings:
color: red
box13:
widget_settings:
color: red
box12:
widget_settings:
color: red
box11:
widget_settings:
color: red
widget_to_parent:
box11:
widget_settings:
z: -1
box12:
widget_settings:
z: 2
color: red
y: middle+2
show_christmas_slide_full:
widget2:
widget_settings:
expire: 5s
slide: slide1
key: xmas_intro_keyname
remove_christmas_full:
widget2:
action: remove
key: xmas_intro_keyname
show_widget9:
widget9:
key: wigdet9_wp_key
show_widget10:
widget10:
action: add
show_bezier_widget: widget_bezier
show_ellipse_widget: widget_ellipse
show_quad_widget: widget_quad
show_rectangle_widget: widget_rectangle
show_line_widget: widget_line
show_triangle_widget: widget_triangle
show_points_widget: widget_points
show_text_widget: widget_text
show_custom_events1_widget: widget_custom_events1
show_custom_events2_widget: widget_custom_events2
remove_custom_events1_widget:
widget_custom_events1:
action: remove
remove_custom_events2_widget:
widget_custom_events2:
action: remove
slide_player:
show_slide_1:
slide_1:
- type: text
text: WIDGET WITH KEY
key: widget1
color: red
y: 33%
- type: text
text: WIDGET NO KEY
color: red
y: 66%
show_slide_1_with_expire:
slide_1:
- type: text
text: WIDGET EXPIRE 1s
expire: 1s
color: red
y: 33%
- type: text
text: WIDGET NO EXPIRE
color: red
y: 66%
show_slide_2:
slide_2:
- type: text
text: TEST UPDATING EXISTING WIDGET SETTINGS
y: bottom
anchor_y: bottom
show_slide_3:
slide_3:
widgets:
- type: text
text: WIDGET REPLACEMENT
y: 25%
show_slide_with_widgets:
slide_1:
- type: text
text: widget4.1
y: 300
z: 1
color: ff0000
font_size: 100
- type: text
text: widget4.2
z: 1000
y: 250
color: ffff00
font_size: 100
- type: text
text: widget4.3
y: 200
color: 00ff00
font_size: 100
- type: text
text: widget4.4
z: 1
y: 150
color: 00ffff
font_size: 100
- type: text
text: widget4.5
z: 1000
y: 100
color: 0000ff
font_size: 100
- type: text
text: widget4.6
color: ff00ff
font_size: 100
y: 50
- type: text
text: widget4.7
y: 0
color: 888888
font_size: 100
show_slide_with_lots_of_widgets: slide_with_lots_of_widgets
show_new_slide:
new_slide2:
widgets:
- type: text
text: NEW SLIDE
y: 0
anchor_y: bottom
events_when_added: text_on_new_slide2_added
events_when_removed: text_on_new_slide2_removed
remove_new_slide:
new_slide2:
action: remove
slides:
slide_with_lots_of_widgets:
- type: text
text: widget4.1
y: 300
z: 1
color: ff0000
font_size: 100
- type: text
text: widget4.2
z: 1000
y: 250
color: ffff00
font_size: 100
- type: text
text: widget4.3
y: 200
color: 00ff00
font_size: 100
- type: text
text: widget4.4
z: 1
y: 150
color: 00ffff
font_size: 100
- type: text
text: widget4.5
z: 1000
y: 100
color: 0000ff
font_size: 100
- type: text
text: widget4.6
color: ff00ff
font_size: 100
y: 50
- type: text
text: widget4.7
y: 0
color: 888888
font_size: 100
#config_version=5
displays:
default:
width: 800
height: 600
named_colors:
tt_yellow: [255,220, 0]
widgets:
base_score_widget:
- type: text
text: HELLO
color: tt_yellow
widget_player:
add_widget1_to_current: base_score_widget
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
widget_player:
mode1_add_widgets: widget2
mode1_add_widget6:
widget6:
widget_settings:
z: -1
mode1_add_widget_with_key:
widget2:
key: newton_crosby
mode1_update_widget2:
widget2:
action: update
key: newton_crosby
widget_settings:
text: UPDATED TEXT
show_widget_with_placeholder: widget_with_placeholder
widgets:
widget_with_placeholder:
- type: text
text: Placeholder widget
- widget: widget_placeholder_(value)
slide_player:
show_slide_with_named_widget: slide_with_named_widget
slides:
slide_with_named_widget:
- type: text
text: One Use Widget
- widget: widget_reusable