🚧 Pack and Veck for arrays of components
This commit is contained in:
parent
3d86115f97
commit
6197052ae7
22 changed files with 229 additions and 114 deletions
|
|
@ -94,17 +94,13 @@ impl Block {
|
|||
}
|
||||
|
||||
pub fn with_component(mut self, component: impl ComponentTrait) -> Self {
|
||||
self.stuff.alter(PackOp::Add, ComponentArc::new(component));
|
||||
self.stuff.alter(PackOp::Add(ComponentArc::with(component)));
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_component_arc(mut self, arc: ComponentArc) -> Self {
|
||||
self.stuff.alter(PackOp::Add, arc);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn alter_components(&mut self, op: PackOp, component: impl ComponentTrait) -> &mut Self {
|
||||
self.stuff.alter(op, ComponentArc::new(component));
|
||||
#[fn_builder]
|
||||
pub fn alter_components(&mut self, op: PackOp) -> &mut Self {
|
||||
self.stuff.alter(op);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue