mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Add rudimentary support for gui windows that you can move around
This commit is contained in:
@@ -8,7 +8,7 @@ use {
|
||||
label,
|
||||
math::vec2,
|
||||
widgets::{Button, Label},
|
||||
Align, Emigui,
|
||||
Align, Emigui, Window,
|
||||
},
|
||||
emigui_glium::Painter,
|
||||
glium::glutin,
|
||||
@@ -90,6 +90,12 @@ fn main() {
|
||||
}
|
||||
example_app.ui(&mut region);
|
||||
emigui.ui(&mut region);
|
||||
|
||||
// TODO: Make it simpler to show a window
|
||||
Window::new("Test window").show(region.data().clone(), |region| {
|
||||
region.add(label!("Grab the window and move it around!"));
|
||||
});
|
||||
|
||||
let mesh = emigui.paint();
|
||||
painter.paint(&display, mesh, emigui.texture());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user