From fb69c932a874e0430e7ed6314f1613c45ec1e737 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Sun, 24 Nov 2024 13:30:10 +0100 Subject: [PATCH] adjust background colors --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index db4a5d2..821168a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()