mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-09-19 13:36:42 +02:00
add origin and align methods to Layout trait
This commit is contained in:
parent
09463649c6
commit
13c886d9e0
18 changed files with 333 additions and 248 deletions
|
|
@ -15,15 +15,6 @@ pub fn iter_once <'a, S: Screen, D: 'a, U: Draw<S>> (
|
|||
}
|
||||
|
||||
/// Iterate over a collection of various [Draw]ables:
|
||||
///
|
||||
/// ```
|
||||
/// use tengri::draw::{Origin::*, Split::*};
|
||||
/// let _ = Below.iter([
|
||||
/// NW.align(W(15).max(W(10).min("Leftbar"))),
|
||||
/// NE.align(W(12).max(W(10).min("Rightbar"))),
|
||||
/// Center.align(W(40).max(H(20.max("Center"))))
|
||||
/// ].iter(), |x|x);
|
||||
/// ```
|
||||
pub fn iter_dyn <
|
||||
S: Screen, // Target screen
|
||||
D, // Input doesn't need to be [Draw]able, output does
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue