Describe the bug
scroll_with_delta doesn't seem to work.
To Reproduce
Steps to reproduce the behavior:
Create an app with eframe.
Copy the scroll_with_delta example from documentation.
Click Scroll down button.
See that nothing happens.
use eframe:: egui:: { self , Vec2 } ;
fn main ( ) -> Result < ( ) , eframe:: Error > {
eframe:: run_native (
"My egui App" ,
eframe:: NativeOptions :: default ( ) ,
Box :: new ( |_cc| Box :: new ( MyApp { } ) ) ,
)
}
struct MyApp { }
impl eframe:: App for MyApp {
fn update ( & mut self , ctx : & egui:: Context , _frame : & mut eframe:: Frame ) {
egui:: CentralPanel :: default ( ) . show ( ctx, |ui| {
let mut scroll_delta = Vec2 :: ZERO ;
if ui. button ( "Scroll down" ) . clicked ( ) {
scroll_delta. y -= 64.0 ; // move content up
}
egui:: ScrollArea :: vertical ( ) . show ( ui, |ui| {
ui. scroll_with_delta ( scroll_delta) ;
for i in 0 ..1000 {
ui. label ( format ! ( "Item {}" , i) ) ;
}
} ) ;
} ) ;
}
}
Expected behavior
Content scrolls down.
Screenshots
untitled.webm
Desktop (please complete the following information):
Describe the bug
scroll_with_deltadoesn't seem to work.To Reproduce
Steps to reproduce the behavior:
eframe.scroll_with_deltaexample from documentation.Scroll downbutton.Expected behavior
Content scrolls down.
Screenshots
untitled.webm
Desktop (please complete the following information):