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:
@@ -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>,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user