Display#
- class RasterPropMonitor.Display()#
A screen page that a script draws, and whose button presses it answers. Obtained by calling
RasterPropMonitor.Monitor.getDisplay()orRasterPropMonitor.display().Note
A monitor shows a display on a page whose handler is
KRPCDisplay. kRPC’s optional Module Manager patch adds such a page, namedkrpc, to every monitor. The content is kept while KSP builds the IVA again, but not saved with the game.- Display.getName()#
The name of the display, or
nullfor a monitor’s own display.- Property:
Read-only, cannot be set
- Return type:
stringornull- Game Scenes:
Flight
- Display.getText()#
- Display.setText(value)#
The text of the display, in Raster Prop Monitor’s page format. It can hold markup, such as
[#ff0000]for a color, and a line can format variables, as in{0:F0} m $&$ ALTITUDE. Raster Prop Monitor updates the variables as it draws.- Property:
Can be read or written
- Return type:
string- Game Scenes:
Flight
- Display.getImage()#
- Display.setImage(value)#
The background image of the display, drawn under the text and scaled to the screen, as a PNG or JPEG image.
nullfor none. Throws an exception if the image does not decode.- Property:
Can be read or written
- Return type:
Uint8Arrayornull- Game Scenes:
Flight
- Display.clear()#
Clear the text and the image.
- Game Scenes:
Flight
- Display.getShown()#
Whether a monitor shows the display now.
- Property:
Read-only, cannot be set
- Return type:
boolean- Game Scenes:
Flight
- Display.buttonPressed(id)#
An event that fires when a monitor showing the display has a button pressed. The event lasts until it is removed.
- Arguments:
id (
number) – The button’s index inRasterPropMonitor.Monitor.getButtons().
- Return type:
- Game Scenes:
Flight
- Display.buttonReleased(id)#
An event that fires when a monitor showing the display has a button released. The event lasts until it is removed.
- Arguments:
id (
number) – The button’s index inRasterPropMonitor.Monitor.getButtons().
- Return type:
- Game Scenes:
Flight