From abdd50576ba8eca338e61ff78b823e0007bae86a Mon Sep 17 00:00:00 2001 From: xfy Date: Wed, 15 Jul 2026 16:17:24 +0800 Subject: [PATCH] fix(ui): make Controls panel vertically scrollable The control panel grew past one screen after the disk/jet additions (Color model, Temperature, Jets section). egui::Window without a height constraint just clips overflowing content. Give it a default width/height, enable resizing, and wrap the body in ScrollArea::vertical so all sections remain reachable. --- src/ui.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui.rs b/src/ui.rs index df7b2f6..8f1cad7 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -10,8 +10,12 @@ pub fn ui_system( if let Ok(ctx) = contexts.ctx_mut() { egui::Window::new("Controls") .collapsible(true) + .resizable(true) .default_pos([16.0, 16.0]) + .default_width(300.0) + .default_height(560.0) .show(ctx, |ui| { + egui::ScrollArea::vertical().show(ui, |ui| { egui::CollapsingHeader::new("Camera") .default_open(true) .show(ui, |ui| { @@ -115,6 +119,7 @@ pub fn ui_system( ui.label("MSAA is decorative on a fullscreen shader (no geometry edges to sample)."); }); }); + }); // egui captures pointer when the cursor is over a window or being interacted with. wants.0 = ctx.egui_wants_pointer_input(); } else {