Skip to content

Commit

Permalink
Fix broken ui example
Browse files Browse the repository at this point in the history
  • Loading branch information
Meshiest committed Dec 31, 2021
1 parent 1f55e72 commit 33b044e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,17 @@ fn ui_example(
));

ui.with_layout(egui::Layout::bottom_up(egui::Align::Center), |ui| {
ui.add(
egui::Hyperlink::new("https://github.com/emilk/egui/").text("powered by egui"),
);
ui.add(egui::Hyperlink::from_label_and_url(
"powered by egui",
"https://github.com/emilk/egui/",
));
});
});

egui::TopBottomPanel::top("top_panel").show(egui_ctx.ctx(), |ui| {
// The top panel is often a good place for a menu bar:
egui::menu::bar(ui, |ui| {
egui::menu::menu(ui, "File", |ui| {
egui::menu::menu_button(ui, "File", |ui| {
if ui.button("Quit").clicked() {
std::process::exit(0);
}
Expand Down

0 comments on commit 33b044e

Please sign in to comment.