From 9e08f085fd4713c22d0eb6677b0ceefce1bdb34c Mon Sep 17 00:00:00 2001 From: Vechro Date: Thu, 22 Aug 2019 20:44:35 +0300 Subject: [PATCH 1/2] Simplify debug info --- voxygen/src/hud/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 4cf7e97a42..52810d7377 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -574,14 +574,14 @@ impl Hud { .color(TEXT_COLOR) .set(self.ids.version, ui_widgets); // Ticks per second - Text::new(&format!("FPS: {:.1}", debug_info.tps)) + Text::new(&format!("FPS: {:.0}", debug_info.tps)) .color(TEXT_COLOR) .down_from(self.ids.version, 5.0) .font_id(self.fonts.opensans) .font_size(14) .set(self.ids.fps_counter, ui_widgets); // Ping - Text::new(&format!("Ping: {:.1}ms", debug_info.ping_ms)) + Text::new(&format!("Ping: {:.0}ms", debug_info.ping_ms)) .color(TEXT_COLOR) .down_from(self.ids.fps_counter, 5.0) .font_id(self.fonts.opensans) @@ -589,7 +589,10 @@ impl Hud { .set(self.ids.ping, ui_widgets); // Player's position let coordinates_text = match debug_info.coordinates { - Some(coordinates) => format!("Coordinates: {:.1}", coordinates.0), + Some(coordinates) => format!( + "Coordinates: ({:.0}, {:.0}, {:.0})", + coordinates.0.x, coordinates.0.y, coordinates.0.z, + ), None => "Player has no Pos component".to_owned(), }; Text::new(&coordinates_text) @@ -600,10 +603,7 @@ impl Hud { .set(self.ids.coordinates, ui_widgets); // Player's velocity let velocity_text = match debug_info.velocity { - Some(velocity) => format!( - "Velocity: ({:.3}, {:.3}, {:.3})", - velocity.0.x, velocity.0.y, velocity.0.z - ), + Some(velocity) => format!("Velocity: {:.1} u/s", velocity.0.magnitude()), None => "Player has no Vel component".to_owned(), }; Text::new(&velocity_text) From 1b4187fd30a3cca707a4d36e1109adf9c6b850af Mon Sep 17 00:00:00 2001 From: Vechro Date: Thu, 22 Aug 2019 22:26:35 +0300 Subject: [PATCH 2/2] Small changes to velocity --- voxygen/src/hud/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 52810d7377..a9f0299f41 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -603,7 +603,13 @@ impl Hud { .set(self.ids.coordinates, ui_widgets); // Player's velocity let velocity_text = match debug_info.velocity { - Some(velocity) => format!("Velocity: {:.1} u/s", velocity.0.magnitude()), + Some(velocity) => format!( + "Velocity: ({:.1}, {:.1}, {:.1}) [{:.1} u/s]", + velocity.0.x, + velocity.0.y, + velocity.0.z, + velocity.0.magnitude() + ), None => "Player has no Vel component".to_owned(), }; Text::new(&velocity_text)