mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-09-18 21:26:44 +02:00
add Screen::area and ::clip to implement Align
This commit is contained in:
parent
ddc53b23c2
commit
482b624169
7 changed files with 85 additions and 37 deletions
|
|
@ -33,3 +33,8 @@ pub trait Coord: Send + Sync + Copy
|
|||
/// Convert to [AtomicUsize].
|
||||
fn atomic (self) -> AtomicUsize { AtomicUsize::new(self.into()) }
|
||||
}
|
||||
|
||||
/// TUI works in u16 coordinates.
|
||||
impl Coord for u16 {
|
||||
fn plus (self, other: Self) -> Self { self.saturating_add(other) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue