Underlay

The "underlay" is an image layer displayed at the bottom of the screen, in the area where the "wheel" icons appear. Its only purpose is to serve as an extra decoration, and give you another way to customize the program's appearance.

How PinballY finds the underlay file

Whenever you select a game in the wheel UI, PinballY loos for a suitable underlay specific to the game.

First, PinballY tries to find a custom underlay for the game's system (e.g., Visual Pinball X). If the game hasn't been configured yet, and its system is ambiguous, we skip this step. Assuming that the game has an associated system, PinballY looks for an image file named according to the system's media directory name, as defined in the settings, using the standard set of extensions for acceptable image file formats (.png, .jpg, etc). Note, though, that you should really only use PNG files for underlays, since it's the only format that supports transparency properly. It then looks for this file in the following folder path:

<Main media folder>\System Underlays

For example, if your Visual Pinball X system's media folder is set to "Visual Pinball X", the program looks for this file:

<Main media folder>\System Underlays\Visual Pinball X.png

If there's no such file, the system looks for a default media file called underlay.png, searching in the usual places for default images (see Files & Folders):

<Main media folder>\Images\underlay.png
<PinballY>\Assets\Images\underlay.png

After determining which underlay file to use for the newly selected game, PinballY checks to see if this is the same underlay file already being displayed. If so, nothing happens. If the file is different, PinballY switches the underlay to the new file.

How to customize the underlay files

To provide your own custom underlay, create a transparent PNG file, and place it as follows:

How the underlay is displayed

Here's an example of an underlay file. This is a PNG file saved with a transparent background, so that it can superimposed over the playfield image or video background layer; the light checkerboard pattern shows transparent areas. Note that you can use the "alpha" channel in a PNG image for partial transparency as well.

Here's how the underlay image above looks on the screen, when superimposed over the playfield background.

Note how the original image has been stretched out to different proportions when displayed as the underlay. The display proportions are determined as follows:

You can adjust all of these option settings in the Game Wheel section of the settings dialog.

Javascript access

PinballY fires the Javascript underlaychange event whenever it's about to change the underlay. This lets scripting code intervene, by canceling the change entirely or by substituting a different image file.

Javascript can initiate an underlay change on its own at any time, via the mainWindow object method setUnderlay(). This gives you the ability to change the whole underlay selection scheme, if you don't like the default scheme where the underlay is selected purely on the basis of the selected game's system.