1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Better re-ordering of grid cells

This commit is contained in:
Emil Ernerfeldt
2023-04-25 21:51:49 +02:00
parent 7b26f3b79f
commit 6563522939
2 changed files with 126 additions and 90 deletions

View File

@@ -43,10 +43,7 @@ impl View {
pub fn ui(&mut self, ui: &mut egui::Ui) -> dock::UiResponse {
ui.painter().rect_filled(ui.max_rect(), 0.0, self.color);
let dragged = ui
.add(
egui::Button::new(format!("Contents of {}. Drag me!", self.title))
.sense(egui::Sense::drag()),
)
.allocate_rect(ui.max_rect(), egui::Sense::drag())
.on_hover_cursor(egui::CursorIcon::Grab)
.dragged();
if dragged {