mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Fix Test3 allways was fallowing the cursour
This commit is contained in:
@@ -168,15 +168,19 @@ fn main() {
|
|||||||
ctx.get_viewport_id()
|
ctx.get_viewport_id()
|
||||||
));
|
));
|
||||||
|
|
||||||
if ctx.get_viewport_id() != ctx.get_parent_viewport_id() {
|
if ui.button("Drag").is_pointer_button_down_on() {
|
||||||
ctx.viewport_command(
|
if ctx.get_viewport_id() != ctx.get_parent_viewport_id() {
|
||||||
ctx.get_viewport_id(),
|
ctx.viewport_command(
|
||||||
egui::window::ViewportCommand::Drag,
|
ctx.get_viewport_id(),
|
||||||
)
|
egui::window::ViewportCommand::Drag,
|
||||||
} else {
|
)
|
||||||
ctx.memory_mut(|mem| {
|
} else {
|
||||||
mem.set_dragged_id(egui::Id::new("Test3").with("frame_resize"))
|
ctx.memory_mut(|mem| {
|
||||||
});
|
mem.set_dragged_id(
|
||||||
|
egui::Id::new("Test2").with("frame_resize"),
|
||||||
|
)
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user