Monitor#

type krpc_RasterPropMonitor_Monitor_t#

A Raster Prop Monitor screen in an IVA, such as an MFD. Obtained by calling krpc_RasterPropMonitor_Monitors().

Note

Raster Prop Monitor draws a monitor only while the player is in the IVA of its pod, or the IVA overlay is on. Reading another monitor’s text or image updates it, in any camera mode.

KRPC_CLASS_RASTERPROPMONITOR_MONITOR#

The service and class ids of the class, for krpc_KRPC_Type_ClassTypeById().

krpc_error_t krpc_RasterPropMonitor_Monitor_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The part the monitor is in.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_PropName(krpc_connection_t connection, char **returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The name of the prop, e.g. RasterPropMonitorBasicMFD.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_Pages(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The names of the pages, in the order of the prop’s configuration.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ActivePage(krpc_connection_t connection, char **returnValue, krpc_RasterPropMonitor_Monitor_t instance)#
krpc_error_t krpc_RasterPropMonitor_Monitor_set_ActivePage(krpc_connection_t connection, krpc_RasterPropMonitor_Monitor_t instance, const char *value)#

Returns the name of the page the monitor shows, and sets it as a press of the page’s button does. Raster Prop Monitor can refuse the switch, or redirect it to another page, as the prop’s configuration sets. Throws an exception if the monitor has no page with the name.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_Buttons(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The names of the monitor’s buttons, e.g. button_UP. A button’s index in this list is its identifier. A name is empty where the configuration leaves a gap.

Game Scenes:

Flight

Note

These are the buttons that the active page handles. The buttons that select pages are not in the list.

krpc_error_t krpc_RasterPropMonitor_Monitor_PressButton(krpc_connection_t connection, krpc_RasterPropMonitor_Monitor_t instance, int32_t id)#

Press and release a button, as the player does. The release is on the next frame. Throws an exception if the monitor has no button with the identifier.

Parameters:
Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_PageButtons(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The names of the prop’s buttons that select the monitor’s pages, e.g. buttonR1. A captured button is one of them.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_PressPageButton(krpc_connection_t connection, krpc_RasterPropMonitor_Monitor_t instance, const char *name)#

Press and release a page button, as the player does. The release is on the next frame. A captured button shows the page the script chose. Throws an exception if the button does not select the monitor’s pages.

Parameters:
Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_CaptureButton(krpc_connection_t connection, krpc_RasterPropMonitor_Monitor_t instance, const char *name, const char *page)#

Take a page button from Raster Prop Monitor. A press of the button then shows the given page, such as the krpc page of the monitor’s own display, in place of the pages Raster Prop Monitor assigns it, and fires krpc_RasterPropMonitor_Monitor_CapturedButtonPressed(). The capture lasts while KSP builds the IVA again, but is not saved with the game. Throws an exception if the button does not select the monitor’s pages, or the monitor has no page with the name.

Parameters:
Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ReleaseCapture(krpc_connection_t connection, krpc_RasterPropMonitor_Monitor_t instance, const char *name)#

Give a captured page button back to Raster Prop Monitor.

Parameters:
  • name – The name of the button.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_CapturedButtonPressed(krpc_connection_t connection, uint64_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance, const char *name)#

An event that fires when the player presses a captured page button. The event lasts until it is removed.

Parameters:
  • name – The name of the button.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_Display(krpc_connection_t connection, krpc_RasterPropMonitor_Display_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The monitor’s own display, which its pages show when their KRPCDisplay handler names no display.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ScreenWidth(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The width of the screen, in characters.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ScreenHeight(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The height of the screen, in lines.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ScreenPixelWidth(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The width of the screen, in pixels.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_ScreenPixelHeight(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The height of the screen, in pixels.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_LetterWidth(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The width of a character, in pixels.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_LetterHeight(krpc_connection_t connection, int32_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The height of a character, in pixels.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_DefaultColor(krpc_connection_t connection, krpc_StdLib_ColorRGBA_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The color of text with no color tag, on the active page.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_Text(krpc_connection_t connection, char **returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The text of the active page, as the screen shows it: one line per screen line, holding the characters Raster Prop Monitor draws. The tags it draws nothing for, such as colors, are removed.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_RawText(krpc_connection_t connection, char **returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The text of the active page with its variables formatted, and Raster Prop Monitor’s markup kept: colors [#rrggbb] and [#rrggbbaa], nudges [@xN] and [@yN] in pixels, [hw] and [dw] for half and double width, [sup], [sub] and [fontN].

Game Scenes:

Flight

Note

The page’s text overlay, drawn over the text, is not included.

krpc_error_t krpc_RasterPropMonitor_Monitor_Variables(krpc_connection_t connection, krpc_list_string_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance)#

The names of the variables the active page shows, in the order of its text.

Game Scenes:

Flight

krpc_error_t krpc_RasterPropMonitor_Monitor_Image(krpc_connection_t connection, krpc_bytes_t *returnValue, krpc_RasterPropMonitor_Monitor_t instance, krpc_StdLib_ImageFormat_t format, int32_t quality)#

The screen as an image, at krpc_RasterPropMonitor_Monitor_ScreenPixelWidth() by krpc_RasterPropMonitor_Monitor_ScreenPixelHeight() pixels.

Parameters:
  • format – The format of the image.

  • quality – The quality of a JPEG image, from 1 to 100.

Returns:

The image data.

Game Scenes:

Flight