Skip to content

Commit 8fd3d96

Browse files
Improve text display
1 parent 46ea79b commit 8fd3d96

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "particles"
3-
version = "1.3.1"
3+
version = "1.3.2"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

src/main.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::ffi::CString;
77

88
#[derive(Parser)]
99
#[clap(
10-
version = "1.3.1",
10+
version = "1.3.2",
1111
author = "Lucas Linhares",
1212
about = r#"Raylib Particle Attraction/Repulsion
1313
Keybindings:
@@ -243,7 +243,11 @@ fn main() {
243243
}
244244

245245
if !args.no_border {
246-
let text = CString::new(format!("Border Collisions: {}", border)).unwrap();
246+
let text = CString::new(format!(
247+
"Borders: {}",
248+
if border { "Collide" } else { "Wrap" }
249+
))
250+
.unwrap();
247251
let text_ptr = text.as_ptr();
248252
raylib::DrawText(
249253
text_ptr,
@@ -260,7 +264,11 @@ fn main() {
260264
}
261265

262266
if !args.no_attract {
263-
let text = CString::new(format!("Attract: {}", attract)).unwrap();
267+
let text = CString::new(format!(
268+
"Mode: {}",
269+
if attract { "Attract" } else { "Repel" }
270+
))
271+
.unwrap();
264272
let text_ptr = text.as_ptr();
265273
raylib::DrawText(
266274
text_ptr,

0 commit comments

Comments
 (0)