[demo] Add separator, hyperlink and SelectableLabel to widget gallery
This commit is contained in:
parent
0b10fa5c29
commit
1c5cdd8575
1 changed files with 16 additions and 0 deletions
|
@ -55,6 +55,10 @@ impl super::View for WidgetGallery {
|
|||
ui.label("Welcome to the widget gallery!");
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Hyperlink:");
|
||||
ui.add(egui::Hyperlink::new("https://github.com/emilk/egui").text(" Egui home page"));
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Text Input:");
|
||||
ui.text_edit_singleline(string);
|
||||
ui.end_row();
|
||||
|
@ -71,6 +75,14 @@ impl super::View for WidgetGallery {
|
|||
});
|
||||
ui.end_row();
|
||||
|
||||
ui.label("SelectableLabel:");
|
||||
ui.horizontal(|ui| {
|
||||
ui.selectable_value(radio, Enum::First, "First");
|
||||
ui.selectable_value(radio, Enum::Second, "Second");
|
||||
ui.selectable_value(radio, Enum::Third, "Third");
|
||||
});
|
||||
ui.end_row();
|
||||
|
||||
ui.label("ComboBox:");
|
||||
egui::combo_box_with_label(ui, "Take your pick", format!("{:?}", radio), |ui| {
|
||||
ui.selectable_value(radio, Enum::First, "First");
|
||||
|
@ -110,6 +122,10 @@ impl super::View for WidgetGallery {
|
|||
*boolean = !*boolean;
|
||||
}
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Separator:");
|
||||
ui.separator();
|
||||
ui.end_row();
|
||||
});
|
||||
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
|
|
Loading…
Reference in a new issue