stack & padding fix sorta, preparing for scroll areas
This commit is contained in:
@@ -100,9 +100,7 @@ impl UiVec2 {
|
||||
self.rel * size + self.abs
|
||||
}
|
||||
|
||||
pub const fn max_size() -> Self {
|
||||
Self::rel(Vec2::ONE)
|
||||
}
|
||||
pub const MAX_SIZE: Self = Self::rel(Vec2::ONE);
|
||||
|
||||
pub const fn from_axis(axis: Axis, aligned: UiScalar, ortho: UiScalar) -> Self {
|
||||
Self {
|
||||
@@ -134,6 +132,8 @@ impl_op!(UiScalar Add add; rel abs);
|
||||
impl_op!(UiScalar Sub sub; rel abs);
|
||||
|
||||
impl UiScalar {
|
||||
pub const ZERO: Self = Self { rel: 0.0, abs: 0.0 };
|
||||
|
||||
pub fn new(rel: f32, abs: f32) -> Self {
|
||||
Self { rel, abs }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user