1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Add Link widget (#1506)

This looks like a Hyperlink, but doesn't do anything when clicked.
Or rather: it lets the user decide what happens on click.

Closes https://github.com/emilk/egui/issues/1152
This commit is contained in:
Emil Ernerfeldt
2022-04-16 22:55:15 +02:00
committed by GitHub
parent 96335d5f45
commit 2d2022fb72
6 changed files with 105 additions and 33 deletions

View File

@@ -141,6 +141,12 @@ impl WidgetGallery {
}
ui.end_row();
ui.add(doc_link_label("Link", "link"));
if ui.link("Click me!").clicked() {
*boolean = !*boolean;
}
ui.end_row();
ui.add(doc_link_label("Checkbox", "checkbox"));
ui.checkbox(boolean, "Checkbox");
ui.end_row();