Skip to content

Commit

Permalink
fixup: Fixes bat-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sverrejb committed Nov 5, 2024
1 parent 0a86027 commit 93cb32a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/seasons.slint
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export component SeasonEffects inherits Rectangle {
}

Image {
// Uses "visible" to hide the bat instead of conditional
//rendering due to https://github.com/slint-ui/slint/issues/3953
visible: bat.pos != { x:0, y: 0 };

property <[image]> frames: [
@image-url("../img/seasons/halloween/bat-0.png"),
Expand All @@ -63,7 +66,6 @@ export component SeasonEffects inherits Rectangle {
property <duration> duration: 1000ms;
property <int> total-frames: frames.length - 1;
source: frames[(total-frames * (animation-tick() / duration)).mod(total-frames)];

x: bat.pos.x;
y: bat.pos.y;
z: 200;
Expand Down

0 comments on commit 93cb32a

Please sign in to comment.