prototyp: statuszeile unter das grid legen statt auf die nordwand
This commit is contained in:
@@ -130,7 +130,7 @@ mod game {
|
||||
// ============================================================================
|
||||
use game::{Command, Direction, Game, Outcome};
|
||||
use ratatui::crossterm::event::{self, Event, KeyCode, KeyEventKind};
|
||||
use ratatui::layout::Rect;
|
||||
use ratatui::layout::{Constraint, Layout, Rect};
|
||||
use ratatui::style::{Color, Style, Stylize};
|
||||
use ratatui::text::Line;
|
||||
use ratatui::widgets::{Block, Clear, Paragraph, Widget};
|
||||
@@ -321,8 +321,11 @@ fn draw(frame: &mut Frame, app: &App) {
|
||||
let block = Block::bordered().title(" Etage 1 ");
|
||||
let inner = block.inner(area);
|
||||
frame.render_widget(block, area);
|
||||
frame.render_widget(GridWidget { game: &app.game }, inner);
|
||||
frame.render_widget(status(app), Rect { height: 1, ..inner });
|
||||
// Statuszeile unter das Grid, sonst liegt sie auf der Nordwand.
|
||||
let [grid, bar] =
|
||||
Layout::vertical([Constraint::Min(0), Constraint::Length(1)]).areas(inner);
|
||||
frame.render_widget(GridWidget { game: &app.game }, grid);
|
||||
frame.render_widget(status(app), bar);
|
||||
}
|
||||
Screen::Confirm { text, .. } => {
|
||||
let popup = centered(area, 44, 5);
|
||||
|
||||
Reference in New Issue
Block a user