mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-01-31 10:56:41 +01:00
fix(bsp, event): pub; don't panic
This commit is contained in:
parent
8c54510f63
commit
b0d2fad17b
2 changed files with 3 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ impl<O: Out, Head: Content<O>, Tail: Content<O>> Draw<O> for Bsp<Head, Tail> {
|
|||
fn draw (&self, to: &mut O) {
|
||||
match self.0 {
|
||||
South => {
|
||||
panic!("{}", self.1.h(to.area()));
|
||||
//panic!("{}", self.1.h(to.area()));
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout([
|
||||
to.area().x(),
|
||||
|
|
@ -30,7 +30,7 @@ impl<O: Out, Head: Content<O>, Tail: Content<O>> Draw<O> for Bsp<Head, Tail> {
|
|||
to.area().w(),
|
||||
to.area().h().minus(area_1.h())
|
||||
].into());
|
||||
panic!("{area_1:?} {area_2:?}");
|
||||
//panic!("{area_1:?} {area_2:?}");
|
||||
to.place_at(area_1, &self.1);
|
||||
to.place_at(area_2, &self.2);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use crate::*;
|
||||
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd)] pub struct TuiEvent(Event);
|
||||
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd)] pub struct TuiEvent(pub Event);
|
||||
impl Ord for TuiEvent {
|
||||
fn cmp (&self, other: &Self) -> std::cmp::Ordering {
|
||||
self.partial_cmp(other)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue