egui_demo_app: add link to my twitter

This commit is contained in:
Emil Ernerfeldt 2022-04-30 17:50:39 +02:00
parent 051deb293f
commit 003dc4aac9
4 changed files with 19 additions and 14 deletions

View file

@ -482,6 +482,8 @@ pub mod special_emojis {
/// The Github logo.
pub const GITHUB: char = '';
/// The Twitter bird.
pub const TWITTER: char = '';
/// The word `git`.
pub const GIT: char = '';

View file

@ -231,7 +231,7 @@ impl BackendPanel {
self.frame_history.fps()
));
} else {
ui.label("Only running UI code when there are animations or input");
ui.label("Only running UI code when there are animations or input.");
}
}
}

View file

@ -167,21 +167,24 @@ impl DemoWindows {
ui.separator();
ScrollArea::vertical().show(ui, |ui| {
use egui::special_emojis::{GITHUB, OS_APPLE, OS_LINUX, OS_WINDOWS};
use egui::special_emojis::{GITHUB, OS_APPLE, OS_LINUX, OS_WINDOWS, TWITTER};
ui.vertical_centered(|ui| {
ui.label("egui is an immediate mode GUI library written in Rust.");
ui.label("egui is an immediate mode GUI library written in Rust.");
ui.label(format!(
"egui runs on the web, or natively on {}{}{}",
OS_APPLE, OS_LINUX, OS_WINDOWS,
));
ui.label(format!(
"egui runs on the web, or natively on {}{}{}",
OS_APPLE, OS_LINUX, OS_WINDOWS,
));
ui.hyperlink_to(
format!("{} egui home page", GITHUB),
"https://github.com/emilk/egui",
);
});
ui.hyperlink_to(
format!("{} egui on GitHub", GITHUB),
"https://github.com/emilk/egui",
);
ui.hyperlink_to(
format!("{} @ernerfeldt", TWITTER),
"https://twitter.com/ernerfeldt",
);
ui.separator();
demos.checkboxes(ui);

View file

@ -126,7 +126,7 @@ impl WidgetGallery {
ui.add(doc_link_label("Hyperlink", "Hyperlink"));
use egui::special_emojis::GITHUB;
ui.hyperlink_to(
format!("{} egui home page", GITHUB),
format!("{} egui on GitHub", GITHUB),
"https://github.com/emilk/egui",
);
ui.end_row();