as last commit - should have been included
This commit is contained in:
parent
13322eb2a1
commit
6c359a0780
2 changed files with 2 additions and 2 deletions
|
|
@ -71,6 +71,6 @@ pub fn draw_farlook(
|
||||||
draw.image(atlas.get("select1").unwrap())
|
draw.image(atlas.get("select1").unwrap())
|
||||||
.position(placement.x, placement.y)
|
.position(placement.x, placement.y)
|
||||||
.size(TILESIZE.sprite_x, TILESIZE.sprite_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.
|
// Get tooltip for idx, etc.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1882,7 +1882,7 @@ pub fn with_article(name: &String) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the map index of a tile in the viewport.
|
/// 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 bounds = crate::camera::get_screen_bounds(ecs, false);
|
||||||
let x = x + bounds.min_x;
|
let x = x + bounds.min_x;
|
||||||
let y = y + bounds.min_y;
|
let y = y + bounds.min_y;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue