Add Block widget

This commit is contained in:
Joscha 2024-03-09 00:52:14 +01:00
parent e31eea8178
commit 2c8f9685b9
7 changed files with 131 additions and 6 deletions

View file

@ -73,6 +73,22 @@ impl Rect {
Self::from_nw_se(nw, se)
}
pub const fn north(self) -> i32 {
self.north
}
pub const fn south(self) -> i32 {
self.south
}
pub const fn west(self) -> i32 {
self.west
}
pub const fn east(self) -> i32 {
self.east
}
pub const fn corner_nw(self) -> Vec2 {
Vec2::new(self.west, self.north)
}