set window title and package name
This commit is contained in:
parent
e5eb4d7cfc
commit
e6f99d3776
3 changed files with 6 additions and 7 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -249,7 +249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "marble2"
|
name = "marble-machinations"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"raylib",
|
"raylib",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "marble2"
|
name = "marble-machinations"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@ use solution::Solution;
|
||||||
use theme::*;
|
use theme::*;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
|
const TITLE_TEXT: &str = concat!("Marble Machinations v", env!("CARGO_PKG_VERSION"));
|
||||||
|
|
||||||
struct Game {
|
struct Game {
|
||||||
levels: Vec<Level>,
|
levels: Vec<Level>,
|
||||||
level_scroll: usize,
|
level_scroll: usize,
|
||||||
|
@ -31,10 +33,7 @@ struct Game {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let (mut rl, thread) = raylib::init()
|
let (mut rl, thread) = raylib::init().resizable().title(TITLE_TEXT).build();
|
||||||
.resizable()
|
|
||||||
.title("good window title")
|
|
||||||
.build();
|
|
||||||
rl.set_target_fps(60);
|
rl.set_target_fps(60);
|
||||||
rl.set_window_min_size(640, 480);
|
rl.set_window_min_size(640, 480);
|
||||||
rl.set_mouse_cursor(MouseCursor::MOUSE_CURSOR_CROSSHAIR);
|
rl.set_mouse_cursor(MouseCursor::MOUSE_CURSOR_CROSSHAIR);
|
||||||
|
@ -99,7 +98,7 @@ impl Game {
|
||||||
d.clear_background(BG_DARK);
|
d.clear_background(BG_DARK);
|
||||||
|
|
||||||
d.draw_text(
|
d.draw_text(
|
||||||
concat!("Marble Machinations v", env!("CARGO_PKG_VERSION")),
|
TITLE_TEXT,
|
||||||
d.get_screen_width() - 275,
|
d.get_screen_width() - 275,
|
||||||
d.get_screen_height() - 20,
|
d.get_screen_height() - 20,
|
||||||
20,
|
20,
|
||||||
|
|
Loading…
Reference in a new issue