From 6c359a078047387455583fb67bd9ca6f4328996c Mon Sep 17 00:00:00 2001 From: Llywelwyn Date: Wed, 11 Oct 2023 09:48:09 +0100 Subject: [PATCH] as last commit - should have been included --- src/gui/farlook.rs | 2 +- src/gui/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/farlook.rs b/src/gui/farlook.rs index 47643dd..b2e23ca 100644 --- a/src/gui/farlook.rs +++ b/src/gui/farlook.rs @@ -71,6 +71,6 @@ pub fn draw_farlook( draw.image(atlas.get("select1").unwrap()) .position(placement.x, placement.y) .size(TILESIZE.sprite_x, TILESIZE.sprite_y); - let _idx = super::viewport_to_map_idx(ecs, x, y); + let _idx = super::viewport_to_idx(ecs, x, y); // Get tooltip for idx, etc. } diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 978725a..316ff9c 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_to_map_idx(ecs: &World, x: i32, y: i32) -> usize { +pub fn viewport_to_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;