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