Create iced_lazy and draft Component trait
This commit is contained in:
parent
d9f970ffd5
commit
bffa7203df
5 changed files with 201 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ where
|
|||
Self { position, overlay }
|
||||
}
|
||||
|
||||
/// Returns the position of the [`Element`].
|
||||
pub fn position(&self) -> Point {
|
||||
self.position
|
||||
}
|
||||
|
||||
/// Translates the [`Element`].
|
||||
pub fn translate(mut self, translation: Vector) -> Self {
|
||||
self.position = self.position + translation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue