Minor fix
parent
cb68e9d376
commit
e6512d83fa
|
@ -18,14 +18,14 @@ pub struct UiSprite {
|
|||
|
||||
impl UiSprite {
|
||||
pub fn from(ct: &Content, ui: &UiSpriteConfig) -> Self {
|
||||
Self::from_with_sprite(ct, ui, ui.sprite.unwrap())
|
||||
}
|
||||
|
||||
pub fn from_with_sprite(ct: &Content, ui: &UiSpriteConfig, sprite: SpriteHandle) -> Self {
|
||||
if ui.sprite.is_none() {
|
||||
unreachable!("called `UiSprite.from()` on a UiSprite with a None sprite!")
|
||||
}
|
||||
|
||||
Self::from_with_sprite(ct, ui, ui.sprite.unwrap())
|
||||
}
|
||||
|
||||
pub fn from_with_sprite(ct: &Content, ui: &UiSpriteConfig, sprite: SpriteHandle) -> Self {
|
||||
return Self {
|
||||
anim: SpriteAutomaton::new(ct, sprite),
|
||||
mask: ui.mask,
|
||||
|
|
Loading…
Reference in New Issue