diff --git a/docs/changelog.md b/docs/changelog.md index b866151..5435a4f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,3 +1,10 @@ +## [2.1.0] - January 19 2021 +### Added +- ``icon:bindEvent(iconEventName, eventFunction)`` +- ``icon:unbindEvent(iconEventName)`` + +-------- + ## [2.0.0] - January 19 2021 ### Added - Menus (dropdowns but horizontal and with scrolling support!) diff --git a/docs/features.md b/docs/features.md index 8ac62b4..c4a3103 100644 --- a/docs/features.md +++ b/docs/features.md @@ -89,6 +89,13 @@ icon:setDropdown({ , Icon.new() :setLabel("Category 4") + :setName("CategoryFourIcon") + :bindEvent("selected", function(self) + print(("%s was selected!"):format(self.name)) + end) + :bindEvent("deselected", function(self) + print(("%s was deselected!"):format(self.name)) + end) , }) ``` @@ -114,6 +121,13 @@ icon:setMenu({ , Icon.new() :setLabel("Category 4") + :setName("CategoryFourIcon") + :bindEvent("selected", function(self) + print(("%s was selected!"):format(self.name)) + end) + :bindEvent("deselected", function(self) + print(("%s was deselected!"):format(self.name)) + end) , }) ```