set window title and package name

This commit is contained in:
Crispy 2024-12-09 12:42:50 +01:00
parent e5eb4d7cfc
commit e6f99d3776
3 changed files with 6 additions and 7 deletions

View file

@ -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>,
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,