Function run_with
Source pub fn run_with(config: RunConfig, f: impl FnMut(&mut Context)) -> Result<()>
Available on crate feature crossterm only.
Expand description
Run the TUI loop with custom configuration.
Like run, but accepts a RunConfig to control tick rate, mouse
support, and theming.
ยงExample
use slt::{RunConfig, Theme};
fn main() -> std::io::Result<()> {
slt::run_with(
RunConfig::default().theme(Theme::light()),
|ui| {
ui.text("Light theme!");
},
)
}