adjust background colors

This commit is contained in:
Joachim Lusiardi 2024-11-24 13:30:10 +01:00
parent 62e13ace4c
commit fb69c932a8
1 changed files with 6 additions and 3 deletions

View File

@ -38,6 +38,9 @@ mod player;
mod position;
mod room;
const BACKGROUND_COLOR: Color = Color::DarkGray;
const PANEL_BACKGROUND_COLOR: Color = Color::Black;
//
fn main() -> Result<()> {
let mut game = Game::new(Player::new(realname().as_str(), 30));
@ -53,7 +56,7 @@ fn main() -> Result<()> {
terminal.draw(|frame| {
let mut area = frame.area();
frame.render_widget(
Block::default().style(Style::default().bg(Color::Green)),
Block::default().style(Style::default().bg(BACKGROUND_COLOR)),
area,
);
@ -106,7 +109,7 @@ fn main() -> Result<()> {
.borders(Borders::TOP)
.border_style(Style::default().fg(Color::White))
.border_type(BorderType::Rounded)
.style(Style::default().bg(Color::Blue));
.style(Style::default().bg(PANEL_BACKGROUND_COLOR));
frame.render_widget(
Paragraph::new(format!(
"Health: {} of {}\nDefense: {}\nExp: {}\nGold: {}\nLevel: {} of {}\nInventory used: {} of {}",
@ -138,7 +141,7 @@ fn main() -> Result<()> {
.borders(Borders::TOP)
.border_style(Style::default().fg(Color::White))
.border_type(BorderType::Rounded)
.style(Style::default().bg(Color::Blue));
.style(Style::default().bg(PANEL_BACKGROUND_COLOR));
let paragraph1 = if game.messages.is_empty() {
"".to_string()