mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Implement columns
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user