Skip to content

Commit

Permalink
Add the 'new' method for UiScale
Browse files Browse the repository at this point in the history
  • Loading branch information
st0rmbtw committed Aug 14, 2023
1 parent 43fe83b commit a283ae6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ pub struct UiScale {
pub scale: f64,
}

impl UiScale {
pub const fn new(scale: f64) -> Self {
UiScale { scale }
}
}

impl Default for UiScale {
fn default() -> Self {
Self { scale: 1.0 }
Expand Down

0 comments on commit a283ae6

Please sign in to comment.