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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user