Fix title position
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -6,8 +6,7 @@ on:
|
||||
- "v*"
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
CARGO_TERM_COLOR: alway
|
||||
jobs:
|
||||
clippy:
|
||||
name: clippy
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
use crossterm::event::{Event, EventStream, KeyCode, KeyEvent, KeyEventKind, KeyModifiers};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use ratatui::layout::Alignment;
|
||||
use ratatui::layout::Constraint::Percentage;
|
||||
use ratatui::layout::HorizontalAlignment::Center;
|
||||
use ratatui::style::Stylize;
|
||||
@@ -233,9 +234,9 @@ impl App {
|
||||
Gamestate::Playing => {
|
||||
let canvas = Canvas::default()
|
||||
.block(Block::bordered().title(format!(
|
||||
"PongRS | {} - {}",
|
||||
" PongRS | {} - {} ",
|
||||
self.player_score, self.enemy_score
|
||||
)))
|
||||
)).title_alignment(Alignment::Center))
|
||||
.x_bounds([X_BOUNDS.0, X_BOUNDS.1])
|
||||
.y_bounds([Y_BOUNDS.0, Y_BOUNDS.1])
|
||||
.marker(Marker::Block)
|
||||
|
||||
Reference in new issue
Block a user