generalize EntrySpriteSystem into PlaygroundSystem which all ui will provide

This commit is contained in:
2022-07-02 19:51:30 +00:00
parent f62b42f06b
commit bcd1eca9a0
13 changed files with 97 additions and 29 deletions

View File

@@ -2,14 +2,14 @@
(defNew [&prop :EntrySpriteSystem system
&prop :String positionKey
&prop :Position position
&prop :Archive archive
&prop :Entry e
&prop :ArchiveController controller]
[&mut :Bool selected false]
(let [images (readComponent e Images)]
(whenLet [(objectWith x y z) (dictGet (readComponent e Positions) positionKey)]
(super x y))
(super position.x position.y)
(.onComplete (BitmapData.loadFromFile (joinPath archive.archiveDir "files" (nth images.imageFiles images.pinnedImageIndex)))
->bitmapData {
(loadGraphic bitmapData)