Skip to content

Commit

Permalink
Added build date and GitHub link
Browse files Browse the repository at this point in the history
  • Loading branch information
sdasda7777 committed Mar 24, 2024
1 parent cebf1b3 commit 8091712
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "minesweeper6d"
version = "0.1.3"
edition = "2021"

# build dependencies
[build-dependencies]
chrono = "0.4.35"

# shared dependencies for all versions:
[dependencies]
eframe = "0.26"
Expand Down
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use chrono;

fn main() {
println!("cargo:rustc-env=BUILD_DATE={}", chrono::offset::Utc::now().to_rfc3339());
}
15 changes: 12 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,19 @@ If neighbor hints are enabled, holding Shift freezes them in place, whereas hold
if about_window_enabled {
egui::Window::new("About")
.open(&mut about_window_enabled).show(ctx, |ui| {
ui.label(format!(
r"Minesweeper4D (version {})

Code written by sdasda7777 (github.com/sdasda7777) (except where noted otherwise) with a lot of help from amazing members of the egui Discord server", option_env!("CARGO_PKG_VERSION").unwrap()));
ui.vertical(|ui| {
ui.spacing_mut().item_spacing.y = 10.0;
ui.label(format!("Minesweeper4D\n(version {}, built on {})",
env!("CARGO_PKG_VERSION"),
env!("BUILD_DATE")));
ui.horizontal_wrapped(|ui| {
ui.hyperlink_to("GitHub page", "https://github.com/sdasda7777/minesweeper6d");
ui.label("(https://github.com/sdasda7777/minesweeper6d)");
});

ui.label("Code written by sdasda7777 (github.com/sdasda7777) (except where noted otherwise) with a lot of help from amazing members of the egui Discord server.");
});
});
}
self.about_window_enabled = about_window_enabled;
Expand Down

0 comments on commit 8091712

Please sign in to comment.