1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Implement columns

This commit is contained in:
Emil Ernerfeldt
2019-01-07 08:54:37 +01:00
parent ae40b617ad
commit 9f876b3ccd
4 changed files with 176 additions and 130 deletions

View File

@@ -82,12 +82,6 @@ impl GuiSettings for App {
}]));
gui.reserve_space(self.size, None);
});
gui.foldable("LayoutOptions", |gui| {
let mut options = gui.options().clone();
options.show_gui(gui);
gui.set_options(options);
});
}
}

View File

@@ -60,9 +60,14 @@ impl State {
let mut style = self.emgui.style.clone();
let mut region = self.emgui.whole_screen_region();
let mut region = region.centered_column(300.0);
let mut region = region.centered_column(480.0);
self.app.show_gui(&mut region);
let mut options = self.emgui.options().clone();
region.foldable("LayoutOptions", |gui| {
options.show_gui(gui);
});
// TODO: move this to some emgui::example module
region.foldable("Style", |gui| {
style.show_gui(gui);
@@ -86,6 +91,7 @@ impl State {
});
});
self.emgui.set_options(options);
self.emgui.style = style;
let frame = self.emgui.paint();