From 42f20330ba5d5f127419c9e499d83dbfb0b09da1 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 19 Jun 2022 23:41:48 +0000 Subject: [PATCH] use whenLet instead of case --- .../nat-flixel-desktop-playground/source/EntrySprite.kiss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss b/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss index 0a097434..81753ce1 100644 --- a/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss +++ b/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss @@ -7,9 +7,8 @@ [&mut :Bool selected false] (let [images (readComponent e Images)] - (case (dictGet (readComponent e Positions) positionKey) - ((object x x y y z z) - (super x y))) + (whenLet [(objectWith x y z) (dictGet (readComponent e Positions) positionKey)] + (super x y)) (.onComplete (BitmapData.loadFromFile (joinPath archive.archiveDir "files" (nth images.imageFiles images.pinnedImageIndex))) ->bitmapData { (loadGraphic bitmapData)