epi: drag native window (#728)

* feat: drag window

* Update epi/src/lib.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Update egui_demo_lib/src/backend_panel.rs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* cargo fmt

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
zu1k
2021-09-28 17:34:58 +02:00
committed by GitHub
co-authored by Emil Ernerfeldt
parent 1b36863248
commit f6fb4d942a
4 changed files with 24 additions and 0 deletions
+7
View File
@@ -208,6 +208,13 @@ impl BackendPanel {
if ui.button("Quit").clicked() {
frame.quit();
}
if ui
.button("Drag me to drag window")
.is_pointer_button_down_on()
{
frame.drag_window();
}
}
}