LaunchEvent
This class represents events that occur during the game launch
process related to updating the "Launch Overlay", which is a graphics
layer in the UI where the system displays status messages about
the progress of the launch. You can use these events to customize
the appearance of the overlay.
This class includes the following subtypes:
- launchoverlayshow: Fired when the system initially shows
the launch overlay. By default, the system fills the playfield screen
with a dark background. You can intercept this event to display your
own alternative graphics, using the mainWindow.launchOverlay
object, which lets you access the overlay to draw custom graphics
or load your own videos or images.
See the section on the launchOverlay object for details.
- launchoverlaymessage: Fired each time the system updates the
message in the launch overlay. The system also displays the "wheel icon"
for the game as part of the text layer. If you wish to do your own
custom drawing, you can cancel the event to prevent the system from
showing its standard message graphics.
If you let the event proceed, the system draws its default message
update as usual, but you can modify the text message it displays
and control whether or not the game's wheel icon is drawn by
changing properties in the event object. See the event properties
below for more details.
- launchoverlayhide: Fired when the system hides the launch
overlay, when a launched game terminates and PinballY returns to its
normal UI. This event can't be canceled as it's fired after the fact.
The event target for this event type is the
mainWindow object.
Event sequence
For each game launch, these events are fired in the following order:
- launchoverlayshow is fired once
- launchoverlaymessage is fired several times, corresponding to the
progress of the launch process; the exact sequence depends upon whether or
not the launch is successful, whether it's a normal launch for interactive
play or a launch for media capture, etc
- launchoverlayhide is fired once
Drawing layers
The point of these events is to let you take control over the
visual presentation of the launch process, so it's helpful to understand
the way the graphics are constructed. There are actually two drawing
layers making up the "launch overlay":
- A front layer, where the system displays text messages indicating
the status of the launch, and the game's wheel icon. This is all drawn
with a transparent background fill, so that the back layer shows through.
You can access this layer via the
mainWindow.launchOverlay.fg
object.
- A back layer, for background graphics. The system simply displays
a dark background fill here. You can access this layer via the
mainWindow.launchOverlay.bg
object.
The two layers are separated so that you can display a fixed graphic or
video background during the entire launch process, with text messages
superimposed in the foreground layer as the launch process proceeds.
Since the text messages are in a separate layer, they can be updated at
each step without having to redraw the background graphics or reload
the video.
Both of these layers are drawn in front of all of the other layers (the
wheel icons and the playfield background image or video), which also
remain on the screen during the launch process. The system's
default drawing makes the background layer opaque, hiding the other
layers. You can draw a transparent or partially transparent background
if you want to let the regular playfield background continue to appear
on screen during the launch.
Properties
Launch events include all of the standard event properties and methods (see the
Event class), plus the following: