displays:
This is a config file reference. Click for instructions.
This page is reference material which explains every setting and option for this section of an MPF yaml config file. See the instructions for config files for formatting and other details. See our guide to config file examples for more examples of real configs in action.
Valid in | |
---|---|
machine config files | YES |
mode config files | NO |
The displays:
section of your config is where you configure the
logical displays in your machine. A display is used to show slides, and
can be an on-screen window or a DMD.
You can have more than one display. For example, if you want to have a
DMD and also display an on-screen window, you'll actually have two
displays:
, the DMD is one and the on-screen window is the other.
Here's an example displays:
section from Demo Man with two
displays:
displays:
window:
height: 200
width: 600
dmd:
width: 128
height: 32
default: true
round_anchor_x: left
In the example above, one of the displays is called window and the
other is called dmd. Note that the names here are completely
arbitrary. Just naming a display "window" does not make it show up in
the window, and naming a display "dmd" doesn't make it show up in the
DMD. (When you configure your window in the window:
section of your
config, you specify the name of the display you want to be the source
for the window content. Same for the DMD.)
The names of the displays are used as "targets" for your slides. So
when you show a slide, you specify which display you want it to show on.
If you don't specify a target, it will choose the default. If you only
have one display, you never have to worry about this because that
display will always be the default. If you have more than one, you can
add the default: true
to a display here to tell MPF which display is
your default which is used when you play slides without specifying a
target.
Note
Starting in MPF v0.33, If you do not put a displays:
section in your
machine config, MPF will automatically create a single display called
"default" with a size of 800x600. (This matches the default window
size.)
Each display in your displays:
section can have the following
settings:
Optional settings
The following sections are optional in the displays:
section of your
config. (If you don't include them, the default will be used).
default:
Single value, type: boolean
(true
/false
). Default: false
Specifies that this display is the default, meaning it's the display that's used if you show a slide without specifying a target for that slide. If you only have one display, it will be the default automatically.
enabled:
Single value, type: boolean
(true
/false
). Default: true
Whether this display is enabled. If false, all slide and widget player calls targeting this display will be ignored.
height:
Single value, type: integer
. Default: 600
The height if the display, in pixels. Note that if you're showing this display on the screen, you can scale the screen window which will scale the display. So the height here can be thought of as the "native" height of the display.
round_anchor_x:
Single value, type: string
. Default: center
Indicates that this display should not render widgets on fractional
horizontal pixels, e.g. anchoring an 11px-wide widget at -5.5 pixels.
When specified with left
or right
, this display will round the pixel
position to the nearest whole pixel in that direction.
This setting can also be configured on an individual widget to override the display's configuration.
round_anchor_y:
Single value, type: string
. Default: middle
Indicates that this display should not render widgets on fractional
vertical pixels, e.g. anchoring an 11px-high widget at -5.5 pixels. When
specified with bottom
or top
, this display will round the pixel
position to the nearest whole pixel in that direction.
This setting can also be configured on an individual widget to override the display's configuration.
width:
Single value, type: integer
. Default: 800
The width of the display, in pixels.
console_log:
Single value, type: one of the following options: none, basic, full.
Default: basic
Log level for the console log for this device.
debug:
Single value, type: boolean
(true
/false
). Default: false
Set this to true to see additional debug output. This might impact the performance of MPF.
file_log:
Single value, type: one of the following options: none, basic, full.
Default: basic
Log level for the file log for this device.
label:
Single value, type: string
. Default: %
Name of this device in service mode.
tags:
List of one (or more) values, each is a type: string
. Defaults to
empty.
Unused.
Related How To guides
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