Skip to main content

Crate bevy_slt

Crate bevy_slt 

Source
Expand description

Bevy integration for slt.

Draw an SLT UI from a Bevy system by calling SltContext::draw on a context resource. Two backends are provided:

  • SltTerminalPlugin (feature terminal, on by default) renders to the real terminal, forwards terminal input as Bevy messages, and restores the terminal on exit or panic.
  • SltHeadlessPlugin renders to an in-memory buffer and publishes each frame as the SltOutput resource, for display via Bevy UI, a texture, or assertions in tests.

Structs§

HeadlessBackend
In-memory backend with no terminal attached.
SltContext
An SLT session (persistent AppState, RunConfig, pending input) driven from Bevy systems.
SltHeadlessPlugin
Adds an SltHeadlessContext non-send resource and publishes each frame as SltOutput in PostUpdate.
SltKeyMessage
A key event read from the terminal.
SltMouseMessage
A mouse event read from the terminal.
SltOutput
The latest rendered headless frame, as both text and cells.
SltPasteMessage
Text pasted into the terminal.
SltResizeMessage
The terminal was resized, in cells.
SltTerminalPlugin
Terminal-backed SLT plugin, modeled after bevy_ratatui.
TerminalBackend
Crossterm-backed slt Backend writing to stdout.

Enums§

SltFocusMessage
The terminal gained or lost focus.

Traits§

SltBackend
A surface SltContext can drive: an slt Backend that can also resize and expose the last completed frame.

Functions§

restore_terminal
Restores the terminal to its normal state.

Type Aliases§

SltHeadlessContext
SltContext rendering to an in-memory buffer.
SltTerminalContext
SltContext rendering to the real terminal.