draw showinventory

This commit is contained in:
Llywelwyn 2023-09-30 08:53:16 +01:00
parent b524cc3b08
commit 0d834f5e23
3 changed files with 22 additions and 6 deletions

16
src/gui/inventory.rs Normal file
View file

@ -0,0 +1,16 @@
use notan::prelude::*;
use notan::draw::{ Draw, Font };
use specs::prelude::*;
use super::TILESIZE;
pub fn draw_inventory(ecs: &World, draw: &mut Draw, font: &Font) {
let inv = super::get_player_inventory(ecs);
let offsets = crate::camera::get_offset();
super::print_options(
draw,
font,
&inv,
(offsets.x as f32) * TILESIZE,
(offsets.y as f32) * TILESIZE
);
}