Add Block widget
This commit is contained in:
parent
e31eea8178
commit
2c8f9685b9
7 changed files with 131 additions and 6 deletions
|
|
@ -31,6 +31,10 @@ impl<'a> View<'a> {
|
|||
self.area.size()
|
||||
}
|
||||
|
||||
pub fn area(&self) -> Rect {
|
||||
Rect::from_nw(Vec2::ZERO, self.size())
|
||||
}
|
||||
|
||||
fn pos_to_buffer_pos(&self, pos: Vec2) -> Vec2 {
|
||||
pos + self.area.corner_nw()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue