1
0
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:
Emil Ernerfeldt
2020-04-17 14:26:36 +02:00
parent b26359d383
commit 1d3836ba80
10 changed files with 297 additions and 79 deletions

View File

@@ -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());
}