mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Some more work now stuff is rendered corectly
This commit is contained in:
@@ -8,6 +8,9 @@ fn main() {
|
||||
|
||||
let mut to_repair = false;
|
||||
|
||||
let mut show = false;
|
||||
let mut value = 0.0;
|
||||
|
||||
let _ = eframe::run_simple_native(
|
||||
"Viewports Examples",
|
||||
NativeOptions {
|
||||
@@ -35,10 +38,21 @@ fn main() {
|
||||
ui.label("Parent Viewport ID: ");
|
||||
ui.label(format!("{parent_viewport_id}"))
|
||||
});
|
||||
ui.checkbox(&mut show, "Show");
|
||||
ui.add(
|
||||
egui::widgets::DragValue::new(&mut value)
|
||||
.clamp_range(-10..=10)
|
||||
.speed(0.1),
|
||||
);
|
||||
})
|
||||
},
|
||||
);
|
||||
|
||||
if show {
|
||||
ui.label("Is shown!");
|
||||
ui.label(format!("Value: {value}"));
|
||||
}
|
||||
|
||||
egui::CollapsingHeader::new("Show Test1").show(ui, |ui| {
|
||||
egui::Window::new("Test1").show(ctx, move |ui, id, parent_id| {
|
||||
ui.label(format!("Frame: {}", ui.ctx().frame_nr()));
|
||||
|
||||
Reference in New Issue
Block a user