From 732896c427dc7dd39222caa13e5fabe75cf64c52 Mon Sep 17 00:00:00 2001 From: caeyo Date: Thu, 13 Aug 2026 21:08:19 +1000 Subject: [PATCH] Add support for buttons in autosplitter settings --- src/main.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3cfefa6..a924b7a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -658,6 +658,27 @@ impl egui_dock::TabViewer for TabViewer<'_> { )); } } + settings::WidgetKind::Button => { + ui.add_space(spacing); + let mut button = ui.button(&*setting.description); + if let Some(tooltip) = &setting.tooltip { + button = button.on_hover_text(&**tooltip); + } + if button.clicked() { + if let Err(e) = + runtime.invoke_settings_button(&setting.key) + { + self.state.timer.0.write().unwrap().log( + format!( + "{:?}", + e.context("Failed invoking settings button.") + ) + .into(), + LogType::Runtime(LogLevel::Error), + ); + } + } + } }); ui.end_row(); }