1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Create region.add_label shortcut

This commit is contained in:
Emil Ernerfeldt
2020-04-20 23:42:11 +02:00
parent c7efd72a75
commit 335b22d38d
4 changed files with 20 additions and 16 deletions

View File

@@ -93,19 +93,15 @@ fn main() {
// TODO: Make it even simpler to show a window
Window::new("Test window").show(region.ctx(), |region| {
region.add(label!("Grab the window and move it around!"));
region.add(label!(
"This window can be reisized, but not smaller than the contents."
));
region.add_label("Grab the window and move it around!");
region.add_label("This window can be reisized, but not smaller than the contents.");
});
Window::new("Resize me!")
.default_pos(pos2(400.0, 100.0))
.expand_to_fit_content(false)
.show(region.ctx(), |region| {
region.add(label!(
"This window may shrink so small that its contents no longer fit."
));
region
.add_label("This window may shrink so small that its contents no longer fit.");
});
let mesh = emigui.paint();