mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
edn stub examples are now runnable
the Render/Content trait pair is very finicky
This commit is contained in:
parent
f1b3fc0040
commit
f6c603bf73
9 changed files with 69 additions and 56 deletions
|
|
@ -65,7 +65,7 @@ impl TuiOut {
|
|||
}
|
||||
}
|
||||
|
||||
impl Render<Tui> for &str {
|
||||
impl Content<Tui> for &str {
|
||||
fn layout (&self, to: [u16;4]) -> [u16;4] {
|
||||
to.center_xy([self.chars().count() as u16, 1])
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ impl Render<Tui> for &str {
|
|||
}
|
||||
}
|
||||
|
||||
impl Render<Tui> for String {
|
||||
impl Content<Tui> for String {
|
||||
fn layout (&self, to: [u16;4]) -> [u16;4] {
|
||||
to.center_xy([self.chars().count() as u16, 1])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue