onSelectionChanged UI event

This commit is contained in:
2021-09-27 23:20:05 -06:00
parent 4db843897a
commit bba93a711b
5 changed files with 38 additions and 19 deletions

View File

@@ -208,3 +208,8 @@
(let [text (new FlxText 0 0 0 (error.replace "\n" "|"))]
(text.setFormat null 8 FlxColor.RED)
(showUI text)))
(method :Void onSelectionChanged [:Array<Entry> selectedEntries :Array<Entry> lastSelectedEntries]
(doFor e (selectedEntries.concat lastSelectedEntries)
(whenLet [sprite (dictGet spriteSystem.sprites e.id)]
(sprite.updateColor))))