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

added epi::Frame::set_window_pos (#1505)

this allows setting the position of window at runtime
This commit is contained in:
Boby
2022-04-17 01:57:22 +05:30
committed by GitHub
parent 2b861f86e8
commit 96335d5f45
3 changed files with 17 additions and 0 deletions

View File

@@ -323,6 +323,11 @@ impl Frame {
self.output.decorated = Some(decorated);
}
/// set the position of the outer window
pub fn set_window_pos(&mut self, pos: egui::Pos2) {
self.output.window_pos = Some(pos);
}
/// When called, the native window will follow the
/// movement of the cursor while the primary mouse button is down.
///
@@ -503,5 +508,8 @@ pub mod backend {
/// Set to true to drag window while primary mouse button is down.
pub drag_window: bool,
/// Set to some position to move the outer window (e.g. glium window) to this position
pub window_pos: Option<egui::Pos2>,
}
}