mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
compiles, once again.
now 616 errors downstream...
This commit is contained in:
parent
eb899906f9
commit
cdc513060d
8 changed files with 196 additions and 201 deletions
12
src/space.rs
12
src/space.rs
|
|
@ -158,17 +158,19 @@ impl Split {
|
|||
/// let _ = West.bsp((), ());
|
||||
/// ```
|
||||
pub const fn half <T: Screen> (&self, a: impl Draw<T>, b: impl Draw<T>) -> impl Draw<T> {
|
||||
thunk(move|to: &mut T|{
|
||||
thunk(move|to: &mut T|{
|
||||
let (area_a, area_b) = to.xywh().split_half(self);
|
||||
let (origin_a, origin_b) = self.origins();
|
||||
let a = origin_a.align(a);
|
||||
let b = origin_b.align(b);
|
||||
match self {
|
||||
Self::Below => {
|
||||
to.place(&origin_b.align(b), Some(area_b));
|
||||
to.place(&origin_a.align(a), Some(area_b));
|
||||
to.place(&b, Some(area_b));
|
||||
to.place(&a, Some(area_b));
|
||||
},
|
||||
_ => {
|
||||
to.place(&origin_a.align(a), Some(area_a));
|
||||
to.place(&origin_b.align(b), Some(area_a));
|
||||
to.place(&a, Some(area_a));
|
||||
to.place(&b, Some(area_a));
|
||||
}
|
||||
}
|
||||
Ok(to.xywh()) // FIXME: compute and return actually used area
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue