hotfix: health bar showing incorrect value
This commit is contained in:
parent
27b3d44fdb
commit
7feeafb769
|
@ -116,7 +116,7 @@ pub fn render_ui(
|
||||||
egui::Grid::new("Stats")
|
egui::Grid::new("Stats")
|
||||||
.spacing(egui::Vec2::new(20., 10.))
|
.spacing(egui::Vec2::new(20., 10.))
|
||||||
.show(ui, |ui| {
|
.show(ui, |ui| {
|
||||||
let health_bar = egui::widgets::ProgressBar::new(player.health)
|
let health_bar = egui::widgets::ProgressBar::new(player.health / player.health_max)
|
||||||
.desired_width(window_width / 10.);
|
.desired_width(window_width / 10.);
|
||||||
let mut stamina_bar =
|
let mut stamina_bar =
|
||||||
egui::widgets::ProgressBar::new(player.stamina / player.stamina_max)
|
egui::widgets::ProgressBar::new(player.stamina / player.stamina_max)
|
||||||
|
|
Loading…
Reference in a new issue