mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Revert "Add OutputCommand::SetPointerPosition to set mouse position" (#5867)
Reverts emilk/egui#5776 I noticed that this is already a `ViewportCommand`. Sorry for not seeing that earlier.
This commit is contained in:
committed by
GitHub
parent
cd318f0e55
commit
61e883be25
@@ -16,14 +16,6 @@ impl crate::Demo for CursorTest {
|
||||
|
||||
impl crate::View for CursorTest {
|
||||
fn ui(&mut self, ui: &mut egui::Ui) {
|
||||
if ui
|
||||
.button("Center pointer in window")
|
||||
.on_hover_text("The platform may not support this.")
|
||||
.clicked()
|
||||
{
|
||||
let position = ui.ctx().available_rect().center();
|
||||
ui.ctx().set_pointer_position(position);
|
||||
}
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.heading("Hover to switch cursor icon:");
|
||||
for &cursor_icon in &egui::CursorIcon::ALL {
|
||||
|
||||
Reference in New Issue
Block a user