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

@@ -22,12 +22,10 @@
(enableMouseDrag)
}))
// TODO add onEntrySelected(), onEntryDeselected() callback to ArchiveUI and use these to change color if SelectByName or SelectByTags are used on an Entry that has a sprite in the entryspritesystem's dictionary
(set mousePressedCallback
->[self _x _y]
{
(controller.ToggleEntrySelection e)
(updateColor)
})
(set mouseStopDragCallback
->[self _dx _dy]
@@ -35,7 +33,7 @@
(dictSet positions positionKey (object x (cast this.x Float) y (cast this.y Float) z 0.0)))))
(method updateColor []
(if !(= -1 (controller.selectedEntries.indexOf e))
(if (controller.isSelected e)
{
(set color FlxColor.BLUE)
}