From c2c7aefad1445b4b85a0e83fcd580e514e2ae2cb Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Sat, 20 Jun 2026 23:25:43 -0400 Subject: [PATCH] Onion skin: settings window (frames before/after + opacity) A small 'Onion Skin' egui window (shown while onion skinning is enabled) with DragValues for frames_before/after (0..=5) and an opacity slider, rendered next to the F3 debug overlay. Lets the user tune the configurable settings. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../lightningbeam-editor/src/main.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lightningbeam-ui/lightningbeam-editor/src/main.rs b/lightningbeam-ui/lightningbeam-editor/src/main.rs index e56a75b..75b90e7 100644 --- a/lightningbeam-ui/lightningbeam-editor/src/main.rs +++ b/lightningbeam-ui/lightningbeam-editor/src/main.rs @@ -7032,6 +7032,26 @@ impl eframe::App for EditorApp { } + // Onion skin settings window (shown only when onion skinning is enabled) + if self.onion_skin.enabled { + egui::Window::new("Onion Skin") + .resizable(false) + .collapsible(true) + .anchor(egui::Align2::RIGHT_TOP, [-10.0, 40.0]) + .show(ctx, |ui| { + ui.label("Onion skin settings"); + ui.horizontal(|ui| { + ui.label("Frames before:"); + ui.add(egui::DragValue::new(&mut self.onion_skin.frames_before).range(0..=5)); + }); + ui.horizontal(|ui| { + ui.label("Frames after:"); + ui.add(egui::DragValue::new(&mut self.onion_skin.frames_after).range(0..=5)); + }); + ui.add(egui::Slider::new(&mut self.onion_skin.opacity, 0.0..=1.0).text("Opacity")); + }); + } + // Render custom cursor overlay (on top of everything including debug overlay) custom_cursor::render_overlay(ctx, &mut self.cursor_cache);