Skip to content

Commit

Permalink
activate linear mode if --angle, --spread or --offset is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed Sep 20, 2024
1 parent 68625fe commit 4d305d0
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,17 +425,20 @@ impl From<Opt> for Lolcrab {
if let Some(duration) = cmd.duration {
lol.set_anim_duration(duration as usize);
}
if let Some(angle) = cmd.angle {
lol.set_linear(true);
lol.set_angle(angle);
}
if let Some(spread) = cmd.spread {
lol.set_linear(true);
lol.set_spread(spread);
}
if let Some(offset) = cmd.offset {
lol.set_linear(true);
lol.set_offset(offset);
}
if cmd.linear || cmd.lolcat {
lol.set_linear(true);
if let Some(angle) = cmd.angle {
lol.set_angle(angle);
}
if let Some(spread) = cmd.spread {
lol.set_spread(spread);
}
if let Some(offset) = cmd.offset {
lol.set_offset(offset);
}
}
lol
}
Expand Down

0 comments on commit 4d305d0

Please sign in to comment.