From 3a24eba79a0cf0354e72b90c36ea4d7f61cd992f Mon Sep 17 00:00:00 2001 From: CI <> Date: Tue, 2 Feb 2021 18:33:18 +0000 Subject: [PATCH] 5b2c0d22e898564c009f440366d4e8692c1bc880 --- docs/api/icon.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/api/icon.md b/docs/api/icon.md index 3cb5a01..c618cda 100644 --- a/docs/api/icon.md +++ b/docs/api/icon.md @@ -218,6 +218,22 @@ icon:unbindToggleItem(guiObjectOrLayerCollector) ``` Unbinds the given GuiObject or LayerCollector from the toggle. +---- +#### bindEvent +{chainable} +```lua +icon:bindEvent(iconEventName, eventFunction) +``` +Connects to an [icon event](https://1foreverhd.github.io/TopbarPlus/api/icon/#events) based upon the given ``iconEventName`` and call ``eventFunction`` with arguments ``(self, ...)`` when the event is triggered. + +---- +#### unbindEvent +{chainable} +```lua +icon:unbindEvent(iconEventName) +``` +Unbinds the connection of the associated ``iconEventName``. + ---- #### bindToggleKey {chainable}