space_ex v0.5.1 SpaceEx.UI

Provides functionality for drawing and interacting with in-game user interface elements.

For drawing 3D objects in the flight scene, see the Drawing service.

Link to this section Summary

Functions

Add a new canvas

Remove all user interface elements

Display a message on the screen

The stock UI canvas

Link to this section Functions

Link to this function add_canvas(conn)

Add a new canvas.

If you want to add UI elements to KSPs stock UI canvas, use SpaceEx.UI.stock_canvas/1.

Link to this function clear(conn, opts \\ [])

Remove all user interface elements.

  • client_only — If true, only remove objects created by the calling client.
Link to this function message(conn, content, opts \\ [])

Display a message on the screen.

The message appears just like a stock message, for example quicksave or quickload messages.

  • content — Message content.

  • duration — Duration before the message disappears, in seconds.

  • position — Position to display the message.

Link to this function stock_canvas(conn)

The stock UI canvas.