use whenLet instead of case

This commit is contained in:
2022-06-19 23:41:48 +00:00
parent 9ee6e879d9
commit 42f20330ba

View File

@@ -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)