mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-03-13 12:10:44 +01:00
Content was missing for Bsp, wtf...
This commit is contained in:
parent
06f8ed3ae3
commit
0d8503cc05
2 changed files with 180 additions and 132 deletions
|
|
@ -673,14 +673,42 @@ impl<Head, Tail> Bsp<Head, Tail> {
|
|||
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()));
|
||||
North => { // FIXME
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout(XYWH(
|
||||
to.area().x(), to.area().y().plus(area_1.h()),
|
||||
to.area().w(), to.area().h().minus(area_1.h())
|
||||
));
|
||||
//panic!("{area_1:?} {area_2:?}");
|
||||
to.place_at(area_1, &self.1);
|
||||
to.place_at(area_2, &self.2);
|
||||
},
|
||||
South => {
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout(XYWH(
|
||||
to.area().x(), to.area().y().plus(area_1.h()),
|
||||
to.area().w(), to.area().h().minus(area_1.h())
|
||||
));
|
||||
to.place_at(area_1, &self.1);
|
||||
to.place_at(area_2, &self.2);
|
||||
},
|
||||
East => {
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout(XYWH(
|
||||
to.area().x().plus(area_1.w()), to.area().y(),
|
||||
to.area().w().minus(area_1.w()), to.area().h()
|
||||
));
|
||||
to.place_at(area_1, &self.1);
|
||||
to.place_at(area_2, &self.2);
|
||||
},
|
||||
Above => {
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout(to.area());
|
||||
to.place_at(area_2, &self.2);
|
||||
to.place_at(area_1, &self.1);
|
||||
},
|
||||
Below => {
|
||||
let area_1 = self.1.layout(to.area());
|
||||
let area_2 = self.2.layout(to.area());
|
||||
to.place_at(area_1, &self.1);
|
||||
to.place_at(area_2, &self.2);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue