working frontend, now changing color nonsense

This commit is contained in:
filipriec
2025-02-16 21:16:17 +01:00
parent ffa8931f62
commit a7d35942a1
7 changed files with 346 additions and 175 deletions

View File

@@ -0,0 +1,23 @@
// src/client/components/command_line.rs
use ratatui::{
widgets::{Block, Paragraph},
style::Style,
layout::Rect,
Frame,
};
use crate::client::colors::PastelGrayTheme;
pub fn render_command_line(f: &mut Frame, area: Rect, input: &str, active: bool) {
let prompt = if active { ":" } else { "Press ':' for commands" };
let style = if active {
Style::default().fg(DoomColors::CYAN)
} else {
Style::default().fg(DoomColors::HL)
};
let paragraph = Paragraph::new(format!("{}{}", prompt, input))
.block(Block::default().style(Style::default().bg(DoomColors::BG)))
.style(style);
f.render_widget(paragraph, area);
}