From c6eda08679bfa7bde104b26bf574143c8101ce81 Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Wed, 8 Apr 2020 00:17:22 +0200 Subject: [PATCH] fmt --- voxygen/src/hud/map.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index 4b2f390d9b..69a4efb66a 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -198,12 +198,20 @@ impl<'a> Widget for Map<'a> { let y = player_pos.y as f64 / worldsize.y * 760.0; let x_rel = player_pos.x as f64 / worldsize.x; let y_rel = player_pos.y as f64 / worldsize.y; - let indic_scale = 0.6; + let indic_scale = 0.6; Image::new(self.rot_imgs.indicator_mmap_small.target_north) .bottom_left_with_margins_on( state.ids.grid, - if y_rel > 0.0 && y_rel < 1.0 { y - 37.0 * indic_scale / 2.0 } else { 760.0 - 37.0 * indic_scale / 2.0 }, - if x_rel > 0.0 && x_rel < 1.0 { x - 32.0 * indic_scale / 2.0 } else { 760.0 - 32.0 * indic_scale / 2.0 }, + if y_rel > 0.0 && y_rel < 1.0 { + y - 37.0 * indic_scale / 2.0 + } else { + 760.0 - 37.0 * indic_scale / 2.0 + }, + if x_rel > 0.0 && x_rel < 1.0 { + x - 32.0 * indic_scale / 2.0 + } else { + 760.0 - 32.0 * indic_scale / 2.0 + }, ) .w_h(32.0 * indic_scale, 37.0 * indic_scale) .color(Some(UI_HIGHLIGHT_0))