Skip to content

Commit

Permalink
Make GUI transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Oct 23, 2023
1 parent be898ac commit 4877508
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/scene/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,12 +778,15 @@ fn main() {
let mut quit = false;
let raw_input = egui_winit.take_egui_input(&window);
let egui_output = egui_ctx.run(raw_input, |egui_ctx| {
egui::SidePanel::right("control_panel").show(egui_ctx, |ui| {
example.add_gui(ui);
if ui.button("Quit").clicked() {
quit = true;
}
});
let frame = egui::Frame::default().fill(egui::Color32::from_white_alpha(0x80));
egui::SidePanel::right("control_panel")
.frame(frame)
.show(egui_ctx, |ui| {
example.add_gui(ui);
if ui.button("Quit").clicked() {
quit = true;
}
});
});

egui_winit.handle_platform_output(&window, &egui_ctx, egui_output.platform_output);
Expand Down

0 comments on commit 4877508

Please sign in to comment.