as last commit - should have been included

This commit is contained in:
Llywelwyn 2023-10-11 09:48:09 +01:00
parent 13322eb2a1
commit 6c359a0780
2 changed files with 2 additions and 2 deletions

View file

@ -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.
}

View file

@ -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;