From e6f99d377666071025d2bee120a6bebb1d0d6b20 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Mon, 9 Dec 2024 12:42:50 +0100 Subject: [PATCH] set window title and package name --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6b34e9..fcc1635 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,7 +249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] -name = "marble2" +name = "marble-machinations" version = "0.1.0" dependencies = [ "raylib", diff --git a/Cargo.toml b/Cargo.toml index 2ac2d13..0dcf9b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "marble2" +name = "marble-machinations" version = "0.1.0" edition = "2021" diff --git a/src/main.rs b/src/main.rs index 048e5f6..0b6fb44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,8 @@ use solution::Solution; use theme::*; use util::*; +const TITLE_TEXT: &str = concat!("Marble Machinations v", env!("CARGO_PKG_VERSION")); + struct Game { levels: Vec, level_scroll: usize, @@ -31,10 +33,7 @@ struct Game { } fn main() { - let (mut rl, thread) = raylib::init() - .resizable() - .title("good window title") - .build(); + let (mut rl, thread) = raylib::init().resizable().title(TITLE_TEXT).build(); rl.set_target_fps(60); rl.set_window_min_size(640, 480); rl.set_mouse_cursor(MouseCursor::MOUSE_CURSOR_CROSSHAIR); @@ -99,7 +98,7 @@ impl Game { d.clear_background(BG_DARK); d.draw_text( - concat!("Marble Machinations v", env!("CARGO_PKG_VERSION")), + TITLE_TEXT, d.get_screen_width() - 275, d.get_screen_height() - 20, 20,