hunger to ui
This commit is contained in:
parent
d6ba6c628c
commit
4094d3535c
1 changed files with 13 additions and 0 deletions
|
|
@ -224,6 +224,19 @@ pub fn draw_ui2(
|
||||||
.color(Color::YELLOW)
|
.color(Color::YELLOW)
|
||||||
.size(FONTSIZE)
|
.size(FONTSIZE)
|
||||||
.h_align_right();
|
.h_align_right();
|
||||||
|
if let Some(burden) = burden.get(*player_entity) {
|
||||||
|
use crate::BurdenLevel;
|
||||||
|
let (text, colour) = match burden.level {
|
||||||
|
BurdenLevel::Burdened => ("Burdened", RGB::named(BROWN1)),
|
||||||
|
BurdenLevel::Strained => ("Strained", RGB::named(ORANGE)),
|
||||||
|
BurdenLevel::Overloaded => ("Overloaded", RGB::named(RED)),
|
||||||
|
};
|
||||||
|
draw.text(&font, &text)
|
||||||
|
.position((VIEWPORT_W as f32) * TILESIZE, 50.0 * TILESIZE)
|
||||||
|
.color(Color::from_rgb(colour.r, colour.g, colour.b))
|
||||||
|
.size(FONTSIZE)
|
||||||
|
.h_align_right();
|
||||||
|
}
|
||||||
if stats.god {
|
if stats.god {
|
||||||
draw.text(&font, "--- GODMODE: ON ---")
|
draw.text(&font, "--- GODMODE: ON ---")
|
||||||
.position(20.0 * TILESIZE, 20.0 * TILESIZE)
|
.position(20.0 * TILESIZE, 20.0 * TILESIZE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue