diff --git a/src/gui/farlook.rs b/src/gui/farlook.rs index 2f21317..47643dd 100644 --- a/src/gui/farlook.rs +++ b/src/gui/farlook.rs @@ -67,10 +67,10 @@ pub fn draw_farlook( draw: &mut Draw, atlas: &HashMap ) { - let placement = super::viewport_tile_to_px(x, y); + let placement = super::viewport_to_px(x, y); draw.image(atlas.get("select1").unwrap()) .position(placement.x, placement.y) .size(TILESIZE.sprite_x, TILESIZE.sprite_y); - let _idx = super::viewport_tile_to_map_idx(ecs, x, y); + let _idx = super::viewport_to_map_idx(ecs, x, y); // Get tooltip for idx, etc. } diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 891645c..978725a 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -1882,7 +1882,7 @@ pub fn with_article(name: &String) -> String { } /// Returns the map index of a tile in the viewport. -pub fn viewport_tile_to_map_idx(ecs: &World, x: i32, y: i32) -> usize { +pub fn viewport_to_map_idx(ecs: &World, x: i32, y: i32) -> usize { let bounds = crate::camera::get_screen_bounds(ecs, false); let x = x + bounds.min_x; let y = y + bounds.min_y; @@ -1902,7 +1902,7 @@ impl Px { } /// Returns the pixel location of a tile in the viewport. -pub fn viewport_tile_to_px(x: i32, y: i32) -> Px { +pub fn viewport_to_px(x: i32, y: i32) -> Px { let offsets = crate::camera::get_offset(); Px::new( (x as f32) * TILESIZE.sprite_x + (offsets.x as f32) * TILESIZE.x,